Click or drag to resize

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

Inheritance Hierarchy
SystemObject
  Com.ForbiddenByte.OSA.DataHelpersSimpleDataHelperT

Namespace:  Com.ForbiddenByte.OSA.DataHelpers
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class SimpleDataHelper<T> : IEnumerable<T>, 
	IEnumerable

Type Parameters

T

The SimpleDataHelperT type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCount
Public propertyItem
Public propertyList

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

Top
Methods
  NameDescription
Public methodInsertItems
Public methodInsertOne
Public methodNotifyListChangedExternally
Public methodRemoveItems
Public methodRemoveOne
NOTE: Use RemoveItems(Int32, Int32, Boolean) for bulk removes, as it's way faster
Public methodResetItems
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
Top
Fields
  NameDescription
Protected field_Adapter
Protected field_DataList
Top
Version Information

Optimized ScrollView Adapter

Supported in: 4.1
See Also