public abstract class

SelectionTracker.SelectionObserver<K>

extends java.lang.Object

 java.lang.Object

↳androidx.recyclerview.selection.SelectionTracker.SelectionObserver<K>

Overview

Observer class providing access to information about Selection state changes.

Summary

Constructors
publicSelectionObserver()

Methods
public voidonItemStateChanged(java.lang.Object key, boolean selected)

Called when the state of an item has been changed.

public voidonSelectionChanged()

Called immediately after completion of any set of changes, excluding those resulting in calls SelectionTracker.SelectionObserver.onSelectionRestored().

protected voidonSelectionCleared()

Called when Selection is cleared.

public voidonSelectionRefresh()

Called when the underlying data set has changed.

public voidonSelectionRestored()

Called immediately after selection is restored.

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

Constructors

public SelectionObserver()

Methods

public void onItemStateChanged(java.lang.Object key, boolean selected)

Called when the state of an item has been changed.

protected void onSelectionCleared()

Called when Selection is cleared. TODO(smckay): Make public in a future public API.

public void onSelectionRefresh()

Called when the underlying data set has changed. After this method is called SelectionTracker will traverse the existing selection, calling SelectionTracker.SelectionObserver for each selected item, and deselecting any items that cannot be selected given the updated data-set (and after consulting SelectionPredicate).

public void onSelectionChanged()

Called immediately after completion of any set of changes, excluding those resulting in calls SelectionTracker.SelectionObserver.onSelectionRestored().

public void onSelectionRestored()

Called immediately after selection is restored. SelectionTracker.SelectionObserver will *not* be called for individual items in the selection.