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>


The callback that is called by ObservableList when the list has changed.

Summary

Public constructors

ObservableList.OnListChangedCallback()

Public methods

abstract void onChanged(T sender)

Called whenever a change of unknown type has occurred, such as the entire list being set to new values.

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

Called whenever one or more items in the list have changed.

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

Called whenever items have been inserted into the list.

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

Called whenever items in the list have been moved.

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

Called whenever items in the list have been deleted.

Inherited methods

From class java.lang.Object

Public constructors

ObservableList.OnListChangedCallback

ObservableList.OnListChangedCallback ()

Public methods

onChanged

void onChanged (T sender)

Called whenever a change of unknown type has occurred, such as the entire list being set to new values.

Parameters
sender T: The changing list.

onItemRangeChanged

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

Called whenever one or more items in the list have changed.

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)

Called whenever items have been inserted into the list.

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)

Called whenever items in the list have been moved.

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)

Called whenever items in the list have been deleted.

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

Hooray!