androidx.navigationevent
Provides APIs to easily intercept platform gesture events, including swipes and clicks, to help in app navigation.
Interfaces
NavigationEventDispatcherOwner |
A class that has an |
Cmn
|
OnBackCompletedFallback |
A listener that provides a final fallback action for unhandled |
Cmn
|
OnForwardCompletedFallback |
A listener that provides a final fallback action for unhandled |
Cmn
|
Classes
BrowserInput |
A |
JS
|
DirectNavigationEventInput |
An input that can send events to a |
Cmn
|
NavigationEvent |
Represents a system navigation event, such as a predictive back gesture or a back button press. |
Cmn
|
NavigationEventDispatcher |
A dispatcher for navigation events that can be organized hierarchically. |
Cmn
|
NavigationEventHandler |
Base class for handling navigation gestures dispatched by a |
Cmn
|
NavigationEventHistory |
Represents an immutable snapshot of the navigation history stack. |
Cmn
|
NavigationEventInfo |
Provides contextual information about a navigation state (e.g., a screen or route). |
Cmn
|
NavigationEventInput |
An abstract class for components that generate and dispatch navigation events. |
Cmn
|
NavigationEventTransitionState |
Represents the physical state of a navigation gesture, such as a predictive back or forward swipe. |
Cmn
|
NavigationEventTransitionState.InProgress |
Represents the state where a navigation gesture is actively in progress. |
Cmn
|
OnBackInvokedDefaultInput |
Provides input to a |
android
|
OnBackInvokedInput |
Provides input to a |
android
|
OnBackInvokedOverlayInput |
Provides input to a |
android
|
Objects
NavigationEventInfo.None |
A default used when no specific information is associated with a navigation event. |
Cmn
|
NavigationEventTransitionState.Idle |
Represents the state where no navigation gesture is currently in progress. |
Cmn
|
Annotations
ExperimentalNavigationEventApi |
Marks declarations that are still experimental in the NavigationEvent API, which means that the design of the corresponding declarations has open issues which may (or may not) lead to changes in the future. |
Cmn
|
Top-level functions summary
NavigationEventDispatcherOwner |
NavigationEventDispatcherOwner(Creates a |
Cmn
|
Extension functions summary
NavigationEventDispatcherOwner? |
Retrieve the |
android
|
Unit |
View.setViewTreeNavigationEventDispatcherOwner(Set the |
android
|
BackEvent |
@RequiresApi(value = 34) |
android
|
NavigationEvent |
@RequiresApi(value = 34) |
android
|
Top-level functions
NavigationEventDispatcherOwner
fun NavigationEventDispatcherOwner(
navigationEventDispatcher: NavigationEventDispatcher
): NavigationEventDispatcherOwner
Creates a NavigationEventDispatcherOwner directly backed by the provided NavigationEventDispatcher.
Extension functions
View.findViewTreeNavigationEventDispatcherOwner
fun View.findViewTreeNavigationEventDispatcherOwner(): NavigationEventDispatcherOwner?
Retrieve the NavigationEventDispatcherOwner associated with the given View. This may be used to add a callback for navigation events.
| Returns | |
|---|---|
NavigationEventDispatcherOwner? |
The |
View.setViewTreeNavigationEventDispatcherOwner
fun View.setViewTreeNavigationEventDispatcherOwner(
navigationEventDispatcherOwner: NavigationEventDispatcherOwner?
): Unit
Set the NavigationEventDispatcherOwner associated with the given View. Calls to findViewTreeNavigationEventDispatcherOwner from this view or descendants will return NavigationEventDispatcherOwner.
This should only be called by constructs such as activities or dialogs that manage a view tree and handle the dispatch of navigation events. Callers should only set a NavigationEventDispatcherOwner that will be stable.
| Parameters | |
|---|---|
navigationEventDispatcherOwner: NavigationEventDispatcherOwner? |
|
BackEvent.toNavigationEvent
@RequiresApi(value = 34)
fun BackEvent.toNavigationEvent(): NavigationEvent