NavAction
-
android
class NavAction
Navigation actions provide a level of indirection between your navigation code and the underlying destinations. This allows you to define common actions that change their destination or NavOptions based on the current NavDestination.
The NavOptions associated with a NavAction are used by default when navigating to this action via NavController.navigate.
Actions should be added via NavDestination.putAction.
Summary
Public constructors |
|
|---|---|
NavAction( |
android
|
Public functions |
||
|---|---|---|
open operator Boolean |
android
|
|
open Int |
hashCode() |
android
|
open String |
toString() |
android
|
Public properties |
||
|---|---|---|
Bundle? |
The argument SavedState to be used by default when navigating to this action. |
android
|
@IdRes Int |
The ID of the destination that should be navigated to when this action is used |
android
|
NavOptions? |
The NavOptions to be used by default when navigating to this action. |
android
|
Public constructors
NavAction
NavAction(
destinationId: @IdRes Int,
navOptions: NavOptions? = null,
defaultArguments: Bundle? = null
)
| Parameters | |
|---|---|
destinationId: @IdRes Int |
the ID of the destination that should be navigated to when this action is used. |
navOptions: NavOptions? = null |
special options for this action that should be used by default |
defaultArguments: Bundle? = null |
argument SavedState to be used by default |
Public properties
defaultArguments
var defaultArguments: Bundle?
The argument SavedState to be used by default when navigating to this action.
| Returns | |
|---|---|
Bundle? |
SavedState of default argument values |
destinationId
val destinationId: @IdRes Int
The ID of the destination that should be navigated to when this action is used
navOptions
var navOptions: NavOptions?
The NavOptions to be used by default when navigating to this action.