SimpleDataHelperT Class |
Contains shortcuts for common operations on a list. Most notably, it adds/removes items for you and notifies the adapter after.
If you need full control, consider using your own list and notifying the adapter after each modification. Inspect this class to see how it's done
Namespace: Com.ForbiddenByte.OSA.DataHelpers
The SimpleDataHelperT type exposes the following members.
Name | Description | |
---|---|---|
SimpleDataHelperT |
Name | Description | |
---|---|---|
Count | ||
Item | ||
List | NOTE: If you modify the list directly, the changes won't be reflected in the adapter unless you call NotifyListChangedExternally(Boolean) This is not encouraged for partial inserts/removes (i.e. when some of the items should be kept), because it updates all items' views. Use only if necessary |
Name | Description | |
---|---|---|
InsertItems | ||
InsertOne |
NOTE: Use InsertItems(Int32, IListT, Boolean) for bulk inserts, as it's way faster
| |
NotifyListChangedExternally | ||
RemoveItems | ||
RemoveOne |
NOTE: Use RemoveItems(Int32, Int32, Boolean) for bulk removes, as it's way faster
| |
ResetItems |
NOTE: In case of resets, the preferred way is to clear the List yourself, add the models through it, and then call NotifyListChangedExternally(Boolean).
This saves memory by avoiding creating an intermediary array/list
|