public final class OperationMonitor
extends Object

   ↳ androidx.recyclerview.selection.OperationMonitor

OperationMonitor provides a mechanism to coordinate application logic with ongoing user selection activities (such as active band selection and active gesture selection).

The host Activity or Fragment should avoid changing Adapter data while there are active selection operations, as this can result in a poor user experience.

To know when an operation is active listen to changes using an OperationMonitor.OnChangeListener.


Nested classes

interface OperationMonitor.OnChangeListener

Listen to changes in operation status. 

Public constructors


Public methods

void addListener(OperationMonitor.OnChangeListener listener)

Registers supplied listener to be notified when operation status changes.

boolean isStarted()
void removeListener(OperationMonitor.OnChangeListener listener)

Unregisters listener for further notifications.

Inherited methods

Public constructors


public OperationMonitor ()