OperationMonitor

class OperationMonitor
kotlin.Any
   ↳ 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 android.app.Activity or android.app.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 OnChangeListener.

Summary

Nested classes
abstract

Listen to changes in operation status.

Public constructors

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

Public methods
Unit

Unregisters listener for further notifications.

Unit

Registers supplied listener to be notified when operation status changes.

Boolean

Public constructors

<init>

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 android.app.Activity or android.app.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 OnChangeListener.

Public methods

removeListener

fun removeListener(@NonNull listener: OperationMonitor.OnChangeListener): Unit

Unregisters listener for further notifications.

Parameters
listener OperationMonitor.OnChangeListener:

addListener

fun addListener(@NonNull listener: OperationMonitor.OnChangeListener): Unit

Registers supplied listener to be notified when operation status changes.

Parameters
listener OperationMonitor.OnChangeListener:

isStarted

fun isStarted(): Boolean
Return
Boolean: true if there are any running operations.