Most visited

Recently visited

ListChangeRegistry

public class ListChangeRegistry
extends CallbackRegistry<OnListChangedCallbackObservableList, ListChangeRegistry.ListChanges>

java.lang.Object
   ↳ android.databinding.CallbackRegistry<android.databinding.ObservableList.OnListChangedCallbackandroid.databinding.ObservableList, android.databinding.ListChangeRegistry.ListChanges>
     ↳ android.databinding.ListChangeRegistry


用于管理ObservableList回调的实用工具类。

Summary

Public constructors

ListChangeRegistry()

Public methods

void notifyCallbacks(ObservableList sender, int notificationType, ListChangeRegistry.ListChanges listChanges)

通知所有回调。

void notifyChanged(ObservableList list, int start, int count)

通知已注册的回调,一些元素已经改变。

void notifyChanged(ObservableList list)

通知已注册的回调有未知或整个列表的变化。

void notifyInserted(ObservableList list, int start, int count)

通知已注册的回调已插入元素。

void notifyMoved(ObservableList list, int from, int to, int count)

通知已注册的回调元素已被移动。

void notifyRemoved(ObservableList list, int start, int count)

通知已注册的回调元素已被删除。

Inherited methods

From class android.databinding.CallbackRegistry
From class java.lang.Object

Public constructors

ListChangeRegistry

ListChangeRegistry ()

Public methods

notifyCallbacks

void notifyCallbacks (ObservableList sender, 
                int notificationType, 
                ListChangeRegistry.ListChanges listChanges)

通知所有回调。

Parameters
sender ObservableList: The originator. This is an opaque parameter passed to onNotifyCallback(Object, Object, int, Object)
notificationType int: An opaque parameter passed to onNotifyCallback(Object, Object, int, Object)
listChanges ListChangeRegistry.ListChanges: An opaque parameter passed to onNotifyCallback(Object, Object, int, Object)

notifyChanged

void notifyChanged (ObservableList list, 
                int start, 
                int count)

通知已注册的回调,一些元素已经改变。

Parameters
list ObservableList: The list that changed.
start int: The index of the first changed element.
count int: The number of changed elements.

notifyChanged

void notifyChanged (ObservableList list)

通知已注册的回调有未知或整个列表的变化。

Parameters
list ObservableList: The list that changed.

notifyInserted

void notifyInserted (ObservableList list, 
                int start, 
                int count)

通知已注册的回调已插入元素。

Parameters
list ObservableList: The list that changed.
start int: The index where the elements were inserted.
count int: The number of elements that were inserted.

notifyMoved

void notifyMoved (ObservableList list, 
                int from, 
                int to, 
                int count)

通知已注册的回调元素已被移动。

Parameters
list ObservableList: The list that changed.
from int: The index of the first element moved.
to int: The index of where the element was moved to.
count int: The number of elements moved.

notifyRemoved

void notifyRemoved (ObservableList list, 
                int start, 
                int count)

通知已注册的回调元素已被删除。

Parameters
list ObservableList: The list that changed.
start int: The index of the first element to be removed.
count int: The number of elements removed.

Hooray!