NavigationEventInput


public abstract class NavigationEventInput

Known direct subclasses
DirectNavigationEventInput

An input that can send events to a NavigationEventDispatcher.

OnBackInvokedInput

Provides input from OnBackInvokedCallback to the given NavigationEventDispatcher.


A class that can send events to a NavigationEventDispatcher.

Summary

Public constructors

Protected methods

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.

void

Called after this NavigationEventInput is added to dispatcher.

void
@MainThread
@EmptySuper
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.

Public constructors

Added in 1.0.0-alpha07
public NavigationEventInput()

Protected methods

dispatchOnCancelled

Added in 1.0.0-alpha07
@MainThread
protected final void dispatchOnCancelled()

Call dispatchOnCancelled on the connected dispatcher.

dispatchOnCompleted

Added in 1.0.0-alpha07
@MainThread
protected final void dispatchOnCompleted()

Call dispatchOnCompleted on the connected dispatcher.

dispatchOnProgressed

Added in 1.0.0-alpha07
@MainThread
protected final void dispatchOnProgressed(@NonNull NavigationEvent event)

Call dispatchOnProgressed on the connected dispatcher.

Parameters
@NonNull NavigationEvent event

The event to dispatch.

dispatchOnStarted

Added in 1.0.0-alpha07
@MainThread
protected final void dispatchOnStarted(@NonNull NavigationEvent event)

Call dispatchOnStarted on the connected dispatcher.

Parameters
@NonNull NavigationEvent event

The event to dispatch.

onAdded

Added in 1.0.0-alpha07
@MainThread
@EmptySuper
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

Added in 1.0.0-alpha07
@MainThread
@EmptySuper
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

Added in 1.0.0-alpha07
@MainThread
@EmptySuper
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.