-
- All Implemented Interfaces:
-
tds.androidx.recyclerview.widget.ListUpdateCallback
public final class AdapterListUpdateCallback implements ListUpdateCallback
ListUpdateCallback that dispatches update events to the given adapter.
-
-
Constructor Summary
Constructors Constructor Description AdapterListUpdateCallback(RecyclerView.Adapter adapter)
Creates an AdapterListUpdateCallback that will dispatch update events to the given adapter.
-
Method Summary
Modifier and Type Method Description void
onInserted(int position, int count)
Called when count} number of items are inserted at the given position. void
onRemoved(int position, int count)
Called when count} number of items are removed from the given position. void
onMoved(int fromPosition, int toPosition)
Called when an item changes its position in the list. void
onChanged(int position, int count, Object payload)
Called when count} number of items are updated at the given position. -
-
Constructor Detail
-
AdapterListUpdateCallback
AdapterListUpdateCallback(RecyclerView.Adapter adapter)
Creates an AdapterListUpdateCallback that will dispatch update events to the given adapter.- Parameters:
adapter
- The Adapter to send updates to.
-
-
Method Detail
-
onInserted
void onInserted(int position, int count)
Called when count} number of items are inserted at the given position.
-
onRemoved
void onRemoved(int position, int count)
Called when count} number of items are removed from the given position.
-
onMoved
void onMoved(int fromPosition, int toPosition)
Called when an item changes its position in the list.
-
-
-
-