added in version 1.0.0
belongs to Maven artifact androidx.recyclerview:recyclerview:1.0.0-beta01

SortedListAdapterCallback

public abstract class SortedListAdapterCallback
extends Callback<T2>

java.lang.Object
   ↳ androidx.recyclerview.widget.SortedList.Callback<T2>
     ↳ androidx.recyclerview.widget.SortedListAdapterCallback<T2>


A SortedList.Callback implementation that can bind a SortedList to a RecyclerView.Adapter.

Summary

Public constructors

SortedListAdapterCallback(Adapter adapter)

Creates a SortedList.Callback that will forward data change events to the provided Adapter.

Public methods

void onChanged(int position, int count, Object payload)

Called when count number of items are updated at the given position.

void onChanged(int position, int count)

Called by the SortedList when the item at the given position is updated.

void onInserted(int position, int count)
void onMoved(int fromPosition, int toPosition)
void onRemoved(int position, int count)

Inherited methods

Public constructors

SortedListAdapterCallback

added in version 1.0.0
public SortedListAdapterCallback (Adapter adapter)

Creates a SortedList.Callback that will forward data change events to the provided Adapter.

Parameters
adapter Adapter: The Adapter instance which should receive events from the SortedList.

Public methods

onChanged

added in version 1.0.0
public void onChanged (int position, 
                int count, 
                Object payload)

Called when count number of items are updated at the given position.

Parameters
position int: The position of the item which has been updated.

count int: The number of items which has changed.

payload Object

onChanged

added in version 1.0.0
public void onChanged (int position, 
                int count)

Called by the SortedList when the item at the given position is updated.

Parameters
position int: The position of the item which has been updated.

count int: The number of items which has changed.

onInserted

added in version 1.0.0
public void onInserted (int position, 
                int count)

Parameters
position int

count int

onMoved

added in version 1.0.0
public void onMoved (int fromPosition, 
                int toPosition)

Parameters
fromPosition int

toPosition int

onRemoved

added in version 1.0.0
public void onRemoved (int position, 
                int count)

Parameters
position int

count int