Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

SelectionTracker.SelectionObserver

public static abstract class SelectionTracker.SelectionObserver
extends Object

java.lang.Object
   ↳ androidx.recyclerview.selection.SelectionTracker.SelectionObserver<K>


Observer class providing access to information about Selection state changes.

Summary

Public constructors

SelectionObserver()

Public methods

void onItemStateChanged(K key, boolean selected)

Called when the state of an item has been changed.

void onSelectionChanged()

Called immediately after completion of any set of changes, excluding those resulting in calls to onSelectionRefresh() and onSelectionRestored().

void onSelectionRefresh()

Called when the underlying data set has changed.

void onSelectionRestored()

Called immediately after selection is restored.

Inherited methods

Public constructors

SelectionObserver

public SelectionObserver ()

Public methods

onItemStateChanged

public void onItemStateChanged (K key, 
                boolean selected)

Called when the state of an item has been changed.

Parameters
key K

selected boolean

onSelectionChanged

public void onSelectionChanged ()

Called immediately after completion of any set of changes, excluding those resulting in calls to onSelectionRefresh() and onSelectionRestored().

onSelectionRefresh

public void onSelectionRefresh ()

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

onSelectionRestored

public void onSelectionRestored ()

Called immediately after selection is restored. onItemStateChanged(K, boolean) will *not* be called for individual items in the selection.