public abstract class

ObservableList.OnListChangedCallback<T extends ObservableList>

extends java.lang.Object

 java.lang.Object

↳androidx.databinding.ObservableList.OnListChangedCallback<T>

Overview

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

Summary

Constructors
publicOnListChangedCallback()

Methods
public abstract voidonChanged(ObservableList<T> sender)

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

public abstract voidonItemRangeChanged(ObservableList<T> sender, int positionStart, int itemCount)

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

public abstract voidonItemRangeInserted(ObservableList<T> sender, int positionStart, int itemCount)

Called whenever items have been inserted into the list.

public abstract voidonItemRangeMoved(ObservableList<T> sender, int fromPosition, int toPosition, int itemCount)

Called whenever items in the list have been moved.

public abstract voidonItemRangeRemoved(ObservableList<T> sender, int positionStart, int itemCount)

Called whenever items in the list have been deleted.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public OnListChangedCallback()

Methods

public abstract void onChanged(ObservableList<T> sender)

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

Parameters:

sender: The changing list.

public abstract void onItemRangeChanged(ObservableList<T> sender, int positionStart, int itemCount)

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

Parameters:

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

public abstract void onItemRangeInserted(ObservableList<T> sender, int positionStart, int itemCount)

Called whenever items have been inserted into the list.

Parameters:

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

public abstract void onItemRangeMoved(ObservableList<T> sender, int fromPosition, int toPosition, int itemCount)

Called whenever items in the list have been moved.

Parameters:

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

public abstract void onItemRangeRemoved(ObservableList<T> sender, int positionStart, int itemCount)

Called whenever items in the list have been deleted.

Parameters:

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