# DirectNavigationEventInput

Artifact: [androidx.navigationevent:navigationevent](https://developer.android.com/jetpack/androidx/releases/navigationevent) [View Source](https://cs.android.com/search?q=file:androidx/navigationevent/DirectNavigationEventInput.kt+class:androidx.navigationevent.DirectNavigationEventInput) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

*** ** * ** ***


```
public final class DirectNavigationEventInput extends NavigationEventInput
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.navigationevent.NavigationEventInput](https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput) ||
|   | ↳ | [androidx.navigationevent.DirectNavigationEventInput](https://developer.android.com/reference/androidx/navigationevent/DirectNavigationEventInput) |

*** ** * ** ***

An input that can send events to a `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher`. Instead of subclassing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput`, users can create instances of this class and use it directly.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/navigationevent/DirectNavigationEventInput#DirectNavigationEventInput()()` |

| ### Public methods |
|---|---|
| `final void` | `@https://developer.android.com/reference/androidx/annotation/MainThread https://developer.android.com/reference/androidx/navigationevent/DirectNavigationEventInput#backCancelled()()` Dispatch a back cancelled event with the connected dispatcher. |
| `final void` | `@https://developer.android.com/reference/androidx/annotation/MainThread https://developer.android.com/reference/androidx/navigationevent/DirectNavigationEventInput#backCompleted()()` Dispatch a back completed event with the connected dispatcher. |
| `final void` | `@https://developer.android.com/reference/androidx/annotation/MainThread https://developer.android.com/reference/androidx/navigationevent/DirectNavigationEventInput#backProgressed(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)` Dispatch a back progressed event with the connected dispatcher. |
| `final void` | `@https://developer.android.com/reference/androidx/annotation/MainThread https://developer.android.com/reference/androidx/navigationevent/DirectNavigationEventInput#backStarted(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)` Dispatch a back started event with the connected dispatcher. |
| `final void` | `@https://developer.android.com/reference/androidx/annotation/MainThread https://developer.android.com/reference/androidx/navigationevent/DirectNavigationEventInput#forwardCancelled()()` Dispatch a forward cancelled event with the connected dispatcher. |
| `final void` | `@https://developer.android.com/reference/androidx/annotation/MainThread https://developer.android.com/reference/androidx/navigationevent/DirectNavigationEventInput#forwardCompleted()()` Dispatch a forward completed event with the connected dispatcher. |
| `final void` | `@https://developer.android.com/reference/androidx/annotation/MainThread https://developer.android.com/reference/androidx/navigationevent/DirectNavigationEventInput#forwardProgressed(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)` Dispatch a forward progressed event with the connected dispatcher. |
| `final void` | `@https://developer.android.com/reference/androidx/annotation/MainThread https://developer.android.com/reference/androidx/navigationevent/DirectNavigationEventInput#forwardStarted(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)` Dispatch a forward started event with the connected dispatcher. |

### Inherited methods

From [androidx.navigationevent.NavigationEventInput](https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput) `final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnBackCancelled()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has been **cancelled**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnBackCompleted()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **completed**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnBackProgressed(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)`

Notifies the dispatcher that an ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **progressed**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnBackStarted(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)`

Notifies the dispatcher that a `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **started**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnForwardCancelled()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has been **cancelled**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnForwardCompleted()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **completed**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnForwardProgressed(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)`

Notifies the dispatcher that an ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **progressed**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnForwardStarted(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)`

Notifies the dispatcher that a `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **started**.
`final boolean` `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#hasEnabledBackHandlers()()`

Tracks whether the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/androidx/navigationevent/NavigationEventHandler` for back navigation matching this input's priority scope.
`final boolean` `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#hasEnabledForwardHandlers()()`

Tracks whether the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/androidx/navigationevent/NavigationEventHandler` for forward navigation matching this input's priority scope.
`final boolean` `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#hasEnabledHandlers()()`

Tracks whether the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/androidx/navigationevent/NavigationEventHandler` matching this input's priority scope.
`void` `@https://developer.android.com/reference/androidx/annotation/MainThread
@https://developer.android.com/reference/androidx/annotation/EmptySuper
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onAdded(androidx.navigationevent.NavigationEventDispatcher)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher dispatcher)`

Called after this `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput` is added to `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onAdded(androidx.navigationevent.NavigationEventDispatcher)`.
`void` `@https://developer.android.com/reference/androidx/annotation/MainThread
@https://developer.android.com/reference/androidx/annotation/EmptySuper
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onHasEnabledBackHandlersChanged(kotlin.Boolean)(boolean hasEnabledBackHandlers)`

Called when the enabled state of back handlers in the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` changes.
`void` `@https://developer.android.com/reference/androidx/annotation/MainThread
@https://developer.android.com/reference/androidx/annotation/EmptySuper
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onHasEnabledForwardHandlersChanged(kotlin.Boolean)(boolean hasEnabledForwardHandlers)`

Called when the enabled state of forward handlers in the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` changes.
`void` `@https://developer.android.com/reference/androidx/annotation/MainThread
@https://developer.android.com/reference/androidx/annotation/EmptySuper
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onHasEnabledHandlersChanged(kotlin.Boolean)(boolean hasEnabledHandlers)`

Called when the enabled state of handlers (either back or forward) in the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` changes.
`void` `@https://developer.android.com/reference/androidx/annotation/MainThread
@https://developer.android.com/reference/androidx/annotation/EmptySuper
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onHistoryChanged(androidx.navigationevent.NavigationEventHistory)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEventHistory history)`

Called when the `https://developer.android.com/reference/androidx/navigationevent/NavigationEventHistory` state in the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` changes.
`void` `@https://developer.android.com/reference/androidx/annotation/MainThread
@https://developer.android.com/reference/androidx/annotation/EmptySuper
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onRemoved()()`

Called after this `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput` is removed from a `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher`.

## Public constructors

### DirectNavigationEventInput

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
public DirectNavigationEventInput()
```

## Public methods

### backCancelled

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
public final void backCancelled()
```

Dispatch a back cancelled event with the connected dispatcher.

### backCompleted

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
public final void backCompleted()
```

Dispatch a back completed event with the connected dispatcher.

### backProgressed

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
public final void backProgressed(@NonNull NavigationEvent event)
```

Dispatch a back progressed event with the connected dispatcher.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event` | The `https://developer.android.com/reference/androidx/navigationevent/NavigationEvent` to dispatch. |

### backStarted

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
public final void backStarted(@NonNull NavigationEvent event)
```

Dispatch a back started event with the connected dispatcher.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event` | The `https://developer.android.com/reference/androidx/navigationevent/NavigationEvent` to dispatch. |

### forwardCancelled

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
public final void forwardCancelled()
```

Dispatch a forward cancelled event with the connected dispatcher.

### forwardCompleted

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
public final void forwardCompleted()
```

Dispatch a forward completed event with the connected dispatcher.

### forwardProgressed

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
public final void forwardProgressed(@NonNull NavigationEvent event)
```

Dispatch a forward progressed event with the connected dispatcher.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event` | The `https://developer.android.com/reference/androidx/navigationevent/NavigationEvent` to dispatch. |

### forwardStarted

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
public final void forwardStarted(@NonNull NavigationEvent event)
```

Dispatch a forward started event with the connected dispatcher.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event` | The `https://developer.android.com/reference/androidx/navigationevent/NavigationEvent` to dispatch. |