Most visited

Recently visited

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>


一个 SortedList.Callback实现,可绑定 SortedListRecyclerView.Adapter

Summary

Public constructors

SortedListAdapterCallback(Adapter adapter)

创建一个 SortedList.Callback ,将数据更改事件转发给提供的适配器。

Public methods

void onChanged(int position, int count)

当给定位置上的项目更新时,由SortedList调用。

void onInserted(int position, int count)

当物品插入给定位置时,由SortedList调用。

void onMoved(int fromPosition, int toPosition)

当项目在列表中改变其位置时,由SortedList调用。

void onRemoved(int position, int count)

当一个项目从给定的位置移除时,由SortedList调用。

Inherited methods

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

Public constructors

SortedListAdapterCallback

SortedListAdapterCallback (Adapter adapter)

创建一个将数据更改事件转发给提供的Adapter的 SortedList.Callback

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

Public methods

onChanged

void onChanged (int position, 
                int count)

当给定位置上的项目更新时,由SortedList调用。

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)

当物品插入给定位置时,由SortedList调用。

Parameters
position int: The position of the new item.
count int: The number of items that have been added.

onMoved

void onMoved (int fromPosition, 
                int toPosition)

当项目在列表中改变其位置时,由SortedList调用。

Parameters
fromPosition int: The previous position of the item before the move.
toPosition int: The new position of the item.

onRemoved

void onRemoved (int position, 
                int count)

当一个项目从给定的位置移除时,由SortedList调用。

Parameters
position int: The position of the item which has been removed.
count int: The number of items which have been removed.

Hooray!