ObjectAdapter.DataObserver
abstract class ObjectAdapter.DataObserver
A DataObserver can be notified when an ObjectAdapter's underlying data changes. Separate methods provide notifications about different types of changes.
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
Unit |
Called whenever the ObjectAdapter's data has changed in some manner outside of the set of changes covered by the other range-based change notification methods. |
Unit |
onItemMoved(fromPosition: Int, toPosition: Int)Called when an item is moved from one position to another position |
Unit |
onItemRangeChanged(positionStart: Int, itemCount: Int)Called when a range of items in the ObjectAdapter has changed. |
Unit |
onItemRangeChanged(positionStart: Int, itemCount: Int, payload: Any?)Called when a range of items in the ObjectAdapter has changed. |
Unit |
onItemRangeInserted(positionStart: Int, itemCount: Int)Called when a range of items is inserted into the ObjectAdapter. |
Unit |
onItemRangeRemoved(positionStart: Int, itemCount: Int)Called when a range of items is removed from the ObjectAdapter. |
Public constructors
Public functions
onChanged
fun onChanged(): Unit
Called whenever the ObjectAdapter's data has changed in some manner outside of the set of changes covered by the other range-based change notification methods.
onItemMoved
fun onItemMoved(fromPosition: Int, toPosition: Int): Unit
Called when an item is moved from one position to another position
onItemRangeChanged
fun onItemRangeChanged(positionStart: Int, itemCount: Int): Unit
Called when a range of items in the ObjectAdapter has changed. The basic ordering and structure of the ObjectAdapter has not changed.
onItemRangeChanged
fun onItemRangeChanged(positionStart: Int, itemCount: Int, payload: Any?): Unit
Called when a range of items in the ObjectAdapter has changed. The basic ordering and structure of the ObjectAdapter has not changed.
onItemRangeInserted
fun onItemRangeInserted(positionStart: Int, itemCount: Int): Unit
Called when a range of items is inserted into the ObjectAdapter.