OnBackInvokedInput
-
android
@RequiresApi(value = 33)
sealed class OnBackInvokedInput : NavigationEventInput
| kotlin.Any | ||
| ↳ | androidx.navigationevent.NavigationEventInput | |
| ↳ | androidx.navigationevent.OnBackInvokedInput |
OnBackInvokedDefaultInput |
Provides input to a |
OnBackInvokedOverlayInput |
Provides input to a |
Provides input to a NavigationEventDispatcher by registering an OnBackInvokedCallback to the passed in onBackInvokedDispatcher.
Summary
Protected constructors |
|
|---|---|
OnBackInvokedInput( |
android
|
Protected functions |
||
|---|---|---|
open Unit |
onHasEnabledHandlersChanged(hasEnabledHandlers: Boolean)Called when the enabled state of handlers in the connected |
android
|
open Unit |
Called after this |
android
|
Inherited functions |
||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Protected constructors
OnBackInvokedInput
protected OnBackInvokedInput(
onBackInvokedDispatcher: OnBackInvokedDispatcher,
onBackInvokedCallbackPriority: Int
)
| Parameters | |
|---|---|
onBackInvokedDispatcher: OnBackInvokedDispatcher |
the |
onBackInvokedCallbackPriority: Int |
the priority to use. |
Protected functions
onHasEnabledHandlersChanged
protected open fun onHasEnabledHandlersChanged(hasEnabledHandlers: Boolean): Unit
Called when the enabled state of handlers in the connected NavigationEventDispatcher changes.
This allows the input to enable or disable its own event sourcing. For example, a system back gesture input might only register for gestures when hasEnabledHandlers is true.
The exact set of handlers this reflects depends on the Priority this input was registered with.
| Parameters | |
|---|---|
hasEnabledHandlers: Boolean |
Whether the connected dispatcher has any enabled handlers matching this input's priority scope. |
onRemoved
protected open fun onRemoved(): Unit
Called after this NavigationEventInput is removed from a NavigationEventDispatcher. This can happen when calling NavigationEventDispatcher.removeInput or NavigationEventDispatcher.dispose on the containing NavigationEventDispatcher.