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


Provides input from OnBackInvokedCallback to the given NavigationEventDispatcher.

Summary

Public constructors

OnBackInvokedInput(
    @NonNull OnBackInvokedDispatcher onBackInvokedDispatcher
)

Protected methods

void

Called after this NavigationEventInput is added to dispatcher.

void
onHasEnabledCallbacksChanged(boolean hasEnabledCallbacks)

Callback that will be notified when the connected dispatcher's hasEnabledCallbacks changes.

void

Called after this NavigationEventInput is removed from a NavigationEventDispatcher.

Inherited methods

From androidx.navigationevent.NavigationEventInput
final void

Call dispatchOnCancelled on the connected dispatcher.

final void

Call dispatchOnCompleted on the connected dispatcher.

final void

Call dispatchOnProgressed on the connected dispatcher.

final void

Call dispatchOnStarted on the connected dispatcher.

Public constructors

OnBackInvokedInput

Added in 1.0.0-alpha07
public OnBackInvokedInput(
    @NonNull OnBackInvokedDispatcher onBackInvokedDispatcher
)

Protected methods

onAdded

protected void onAdded(@NonNull NavigationEventDispatcher dispatcher)

Called after this NavigationEventInput is added to dispatcher. This can happen when calling NavigationEventDispatcher.addInput. A NavigationEventInput can only be added to one NavigationEventDispatcher at a time.

Parameters
@NonNull NavigationEventDispatcher dispatcher

The NavigationEventDispatcher that this input is now added to.

onHasEnabledCallbacksChanged

protected void onHasEnabledCallbacksChanged(boolean hasEnabledCallbacks)

Callback that will be notified when the connected dispatcher's hasEnabledCallbacks changes.

Parameters
boolean hasEnabledCallbacks

Whether the connected dispatcher has any enabled callbacks.

onRemoved

protected void onRemoved()

Called after this NavigationEventInput is removed from a NavigationEventDispatcher. This can happen when calling NavigationEventDispatcher.removeInput or NavigationEventDispatcher.dispose on the containing NavigationEventDispatcher.