ListUpdateCallback
public interface ListUpdateCallback
AdapterListUpdateCallback |
ListUpdateCallback that dispatches update events to the given adapter. |
BatchingListUpdateCallback |
Wraps a |
SortedList.Callback |
The class that controls the behavior of the |
SortedList.BatchedCallback |
A callback implementation that can batch notify events dispatched by the SortedList. |
SortedListAdapterCallback |
A |
An interface that can receive Update operations that are applied to a list.
This class can be used together with DiffUtil to detect changes between two lists.
Summary
Public methods |
|
|---|---|
abstract void |
Called when |
abstract void |
onInserted(int position, int count)Called when |
abstract void |
onMoved(int fromPosition, int toPosition)Called when an item changes its position in the list. |
abstract void |
onRemoved(int position, int count)Called when |
Public methods
onChanged
abstract void onChanged(int position, int count, @Nullable Object payload)
Called when count number of items are updated at the given position.
onInserted
abstract void onInserted(int position, int count)
Called when count number of items are inserted at the given position.
| Parameters | |
|---|---|
int position |
The position of the new item. |
int count |
The number of items that have been added. |