public class AdapterDatasourceObserver extends DatasourceObserver
Datasource and
dispatching them to the RecyclerView.Adapter.| Modifier and Type | Method and Description |
|---|---|
void |
onChanged()
Called when the data in the datasource have been changed.
|
void |
onItemMoved(int fromPosition,
int toPosition)
Called when the data have been moved to the another position in the datasource.
|
void |
onItemRangeChanged(int positionStart,
int itemCount,
Object payload)
Called when the data in the datasource have been changed.
|
void |
onItemRangeInserted(int positionStart,
int itemCount)
Called when the new data have been inserted to the datasource.
|
void |
onItemRangeRemoved(int positionStart,
int itemCount)
Called when the new data have been removed from the datasource.
|
public void onChanged()
onChanged in class DatasourceObserverpublic void onItemRangeChanged(int positionStart,
int itemCount,
@Nullable
Object payload)
onItemRangeChanged in class DatasourceObserverpositionStart - Position of the first data item that has changed.itemCount - Number of the data items that have changed.payload - Optional parameter, use null to identify a "full" update.public void onItemRangeInserted(int positionStart,
int itemCount)
onItemRangeInserted in class DatasourceObserverpositionStart - Position of the first data item that was inserted.itemCount - Number of the data items inserted.public void onItemRangeRemoved(int positionStart,
int itemCount)
onItemRangeRemoved in class DatasourceObserverpositionStart - Position of the first data item that was removed.itemCount - Number of the data items removed.public void onItemMoved(int fromPosition,
int toPosition)
onItemMoved in class DatasourceObserverfromPosition - Previous position of the data item.toPosition - New position of the data item.