Skip to content

Most visited

Recently visited

navigation

SortedListAdapterCallback

public abstract class SortedListAdapterCallback
extends Callback<T2>

java.lang.Object
   ↳ android.support.v7.util.SortedList.Callback<T2>
     ↳ android.support.v7.widget.util.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)

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

From class android.support.v7.util.SortedList.Callback
From class java.lang.Object
From interface java.util.Comparator
From interface android.support.v7.util.ListUpdateCallback

Public constructors

SortedListAdapterCallback

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

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

void onInserted (int position, 
                int count)

Parameters
position int
count int

onMoved

void onMoved (int fromPosition, 
                int toPosition)

Parameters
fromPosition int
toPosition int

onRemoved

void onRemoved (int position, 
                int count)

Parameters
position int
count int
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.