belongs to Maven artifact androidx.recyclerview:recyclerview-selection:1.0.0-alpha1

OperationMonitor

public final class OperationMonitor
extends Object

java.lang.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.

Summary

Nested classes

interface OperationMonitor.OnChangeListener

Listen to changes in operation status. 

Public constructors

OperationMonitor()

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

OperationMonitor

OperationMonitor ()

Public methods

addListener

void addListener (OperationMonitor.OnChangeListener listener)

Registers supplied listener to be notified when operation status changes.

isStarted

boolean isStarted ()

Returns
boolean true if there are any running operations.

removeListener

void removeListener (OperationMonitor.OnChangeListener listener)

Unregisters listener for further notifications.