OnBackInvokedOverlayInput


@RequiresApi(value = 33)
public final class OnBackInvokedOverlayInput extends OnBackInvokedInput


Provides input to a NavigationEventDispatcher by registering an OnBackInvokedCallback with the OnBackInvokedDispatcher.PRIORITY_OVERLAY priority to onBackInvokedDispatcher. The input will unregister this callback when there's no enabled NavigationEventHandler with NavigationEventDispatcher.PRIORITY_OVERLAY priority.

Summary

Public constructors

OnBackInvokedOverlayInput(
    @NonNull OnBackInvokedDispatcher onBackInvokedDispatcher
)

Inherited methods

From androidx.navigationevent.NavigationEventInput
final void

Notifies the dispatcher that the ongoing TRANSITIONING_BACK navigation gesture has been cancelled.

final void

Notifies the dispatcher that the ongoing TRANSITIONING_BACK navigation gesture has completed.

final void

Notifies the dispatcher that an ongoing TRANSITIONING_BACK navigation gesture has progressed.

final void

Notifies the dispatcher that a TRANSITIONING_BACK navigation gesture has started.

final void

Notifies the dispatcher that the ongoing TRANSITIONING_FORWARD navigation gesture has been cancelled.

final void

Notifies the dispatcher that the ongoing TRANSITIONING_FORWARD navigation gesture has completed.

final void

Notifies the dispatcher that an ongoing TRANSITIONING_FORWARD navigation gesture has progressed.

final void

Notifies the dispatcher that a TRANSITIONING_FORWARD navigation gesture has started.

final boolean

Tracks whether the connected NavigationEventDispatcher has any enabled NavigationEventHandler for back navigation matching this input's priority scope.

final boolean

Tracks whether the connected NavigationEventDispatcher has any enabled NavigationEventHandler for forward navigation matching this input's priority scope.

final boolean

Tracks whether the connected NavigationEventDispatcher has any enabled NavigationEventHandler matching this input's priority scope.

void

Called after this NavigationEventInput is added to dispatcher.

void
@MainThread
@EmptySuper
onHasEnabledForwardHandlersChanged(boolean hasEnabledForwardHandlers)

Called when the enabled state of forward handlers in the connected NavigationEventDispatcher changes.

void

Called when the enabled state of handlers (either back or forward) in the connected NavigationEventDispatcher changes.

void

Called when the NavigationEventHistory state in the connected NavigationEventDispatcher changes.

From androidx.navigationevent.OnBackInvokedInput
void
onHasEnabledBackHandlersChanged(boolean hasEnabledBackHandlers)

Called when the enabled state of back handlers in the connected NavigationEventDispatcher changes.

void

Called after this NavigationEventInput is removed from a NavigationEventDispatcher.

Public constructors

OnBackInvokedOverlayInput

Added in 1.0.0
public OnBackInvokedOverlayInput(
    @NonNull OnBackInvokedDispatcher onBackInvokedDispatcher
)
Parameters
@NonNull OnBackInvokedDispatcher onBackInvokedDispatcher

the OnBackInvokedDispatcher to use.