NavigationEventState


Known direct subclasses
NavigationEventState.Idle

The UI is settled, and no navigation gesture is currently active.

NavigationEventState.InProgress

A navigation gesture is actively in progress.


Represents the state of a system navigation gesture, like a predictive back swipe. It's either Idle (no gesture in progress) or InProgress (a gesture is active).

Parameters
<T : NavigationEventInfo>

The type of optional information associated with the navigation event. This is typically provided by the UI layer to give context about the navigation state.

Summary

Nested types

The UI is settled, and no navigation gesture is currently active.

A navigation gesture is actively in progress.

Protected constructors

Cmn

Public properties

abstract T

Information about the current NavigationEventState.

Cmn
Float

The progress of the current navigation gesture, typically from 0.0f to 1.0f.

Cmn

Protected constructors

protected <T : NavigationEventInfo> NavigationEventState()
Parameters
<T : NavigationEventInfo>

The type of optional information associated with the navigation event. This is typically provided by the UI layer to give context about the navigation state.

Public properties

currentInfo

abstract val currentInfo: T

Information about the current NavigationEventState.

In the Idle state, this represents the settled UI state. In the InProgress state, this represents the UI state the gesture is navigating towards.

progress

val progressFloat

The progress of the current navigation gesture, typically from 0.0f to 1.0f.

Returns 0f when the state is Idle. When the state is InProgress, it reflects the completion progress of the ongoing gesture from its latestEvent.