Most visited

Recently visited

ObservableList.OnListChangedCallback

public static abstract class ObservableList.OnListChangedCallback
extends Object

java.lang.Object
   ↳ android.databinding.ObservableList.OnListChangedCallback<T extends android.databinding.ObservableList>


列表发生更改时由ObservableList调用的回调。

Summary

Public constructors

ObservableList.OnListChangedCallback()

Public methods

abstract void onChanged(T sender)

在发生未知类型更改时调用,例如将整个列表设置为新值。

abstract void onItemRangeChanged(T sender, int positionStart, int itemCount)

每当列表中的一个或多个项目发生更改时调用。

abstract void onItemRangeInserted(T sender, int positionStart, int itemCount)

每当物品被插入列表中时调用。

abstract void onItemRangeMoved(T sender, int fromPosition, int toPosition, int itemCount)

每当列表中的项目被移动时调用。

abstract void onItemRangeRemoved(T sender, int positionStart, int itemCount)

每当列表中的项目被删除时调用。

Inherited methods

From class java.lang.Object

Public constructors

ObservableList.OnListChangedCallback

ObservableList.OnListChangedCallback ()

Public methods

onChanged

void onChanged (T sender)

在发生未知类型更改时调用,例如将整个列表设置为新值。

Parameters
sender T: The changing list.

onItemRangeChanged

void onItemRangeChanged (T sender, 
                int positionStart, 
                int itemCount)

每当列表中的一个或多个项目发生更改时调用。

Parameters
sender T: The changing list.
positionStart int: The starting index that has changed.
itemCount int: The number of items that have changed.

onItemRangeInserted

void onItemRangeInserted (T sender, 
                int positionStart, 
                int itemCount)

每当物品被插入列表中时调用。

Parameters
sender T: The changing list.
positionStart int: The insertion index
itemCount int: The number of items that have been inserted

onItemRangeMoved

void onItemRangeMoved (T sender, 
                int fromPosition, 
                int toPosition, 
                int itemCount)

每当列表中的项目被移动时调用。

Parameters
sender T: The changing list.
fromPosition int: The position from which the items were moved
toPosition int: The destination position of the items
itemCount int: The number of items moved

onItemRangeRemoved

void onItemRangeRemoved (T sender, 
                int positionStart, 
                int itemCount)

每当列表中的项目被删除时调用。

Parameters
sender T: The changing list.
positionStart int: The starting index of the deleted items.
itemCount int: The number of items removed.

Hooray!