InterfaceLock
Locking for user interface operations.
Use an instance of this class to ensure user interactions are ignored while a user-initiated operation is already running.
Each instance of InterfaceLock is a member of a Group and if no group parameter is provided to the constructor a new group is created by default. Only a single operation can be running across all InterfaceLock instances in the same group. Additional operations are not run until the currently running one completes.
Since the runExclusively is not blocking or suspending, you can monitor the progress using the state and observeState properties.
Constructors
InterfaceLock
Link copied to clipboard
fun InterfaceLock(lifecycle: Lifecycle, group: InterfaceLock.Group = Group())
Content copied to clipboard
Types
Functions
Properties
observeIsLocked
Link copied to clipboard
observeState
Link copied to clipboard
state
Link copied to clipboard