autoFinish
fun autoFinish(coroutine: CoroutineScope, selection: BaseSelection, condition: Boolean = true, onDisableInput: () -> Unit = {}, onSelection: () -> Unit, onFinished: () -> Unit)
A behavior construct for views to handle the automatic selection process when the button view is disabled.
Parameters
coroutine
The coroutine scope that is used to execute the behavior on.
selection
The base selection that is used to identify if the behavior should be enabled or not.
condition
A custom additional condition when the button view is not enabled.
onDisableInput
Listener that is invoked when the input is disabled as it should be blocked based on the behavior.
onSelection
Listener that is invoked the automatic selection is executed.
onFinished
Listener that is invoked when the behavior has ended.