NavOptions
-
Cmn
class NavOptions
NavOptions stores special options for navigate actions
Summary
Nested types |
|---|
class NavOptions.BuilderBuilder for constructing new instances of NavOptions. |
Public functions |
||
|---|---|---|
open operator Boolean |
android
|
|
@IdRes Int |
This function is deprecated. Use popUpToId instead. |
android
|
open Int |
hashCode() |
android
|
Boolean |
Whether the destination set in |
Cmn
android
|
Boolean |
Whether this navigation action should launch as single-top (i.e., there will be at most one copy of a given destination on the top of the back stack). |
Cmn
android
|
Boolean |
Whether the back stack and the state of all destinations between the current destination and |
Cmn
android
|
Boolean |
Whether this navigation action should restore any state previously saved by |
Cmn
android
|
open String |
toString() |
android
|
Public properties |
||
|---|---|---|
Int |
The custom enter Animation/Animator that should be run. |
android
|
Int |
The custom exit Animation/Animator that should be run. |
android
|
Int |
The custom enter Animation/Animator that should be run when this destination is popped from the back stack. |
android
|
Int |
The custom exit Animation/Animator that should be run when this destination is popped from the back stack. |
android
|
Int |
The destination to pop up to before navigating. |
Cmn
android
|
String? |
Route for the destination to pop up to before navigating. |
Cmn
android
|
KClass<*>? |
Route from a |
Cmn
android
|
Any? |
Route from an Object for the destination to pop up to before navigating. |
Cmn
android
|
Public functions
getPopUpTo
fungetPopUpTo(): @IdRes Int
The destination to pop up to before navigating. When set, all non-matching destinations should be popped from the back stack.
isPopUpToInclusive
fun isPopUpToInclusive(): Boolean
Whether the destination set in popUpToRoute should be popped from the back stack.
| See also | |
|---|---|
setPopUpTo |
|
popUpToRoute |
shouldLaunchSingleTop
fun shouldLaunchSingleTop(): Boolean
Whether this navigation action should launch as single-top (i.e., there will be at most one copy of a given destination on the top of the back stack).
This functions similarly to how android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP works with activities.
shouldPopUpToSaveState
fun shouldPopUpToSaveState(): Boolean
Whether the back stack and the state of all destinations between the current destination and popUpToRoute should be saved for later restoration via Builder.setRestoreState or the restoreState attribute using the same ID as popUpToRoute (note: this matching ID is true if isPopUpToInclusive is true. If isPopUpToInclusive is false, this matching ID is the id of the last destination that is popped).
shouldRestoreState
fun shouldRestoreState(): Boolean
Whether this navigation action should restore any state previously saved by Builder.setPopUpTo or the popUpToSaveState attribute.
Public properties
enterAnim
val enterAnim: Int
The custom enter Animation/Animator that should be run.
| Returns | |
|---|---|
Int |
the resource id of a Animation or Animator or -1 if none. |
exitAnim
val exitAnim: Int
The custom exit Animation/Animator that should be run.
| Returns | |
|---|---|
Int |
the resource id of a Animation or Animator or -1 if none. |
popEnterAnim
val popEnterAnim: Int
The custom enter Animation/Animator that should be run when this destination is popped from the back stack.
| Returns | |
|---|---|
Int |
the resource id of a Animation or Animator or -1 if none. |
popExitAnim
val popExitAnim: Int
The custom exit Animation/Animator that should be run when this destination is popped from the back stack.
| Returns | |
|---|---|
Int |
the resource id of a Animation or Animator or -1 if none. |
popUpToId
val popUpToId: Int
The destination to pop up to before navigating. When set, all non-matching destinations should be popped from the back stack.
| Returns | |
|---|---|
Int |
the destinationId to pop up to, clearing all intervening destinations |
popUpToRoute
val popUpToRoute: String?
Route for the destination to pop up to before navigating. When set, all non-matching destinations should be popped from the back stack.
| Returns | |
|---|---|
String? |
the destination route to pop up to, clearing all intervening destinations |
popUpToRouteClass
val popUpToRouteClass: KClass<*>?
Route from a KClass for the destination to pop up to before navigating. When set, all non-matching destinations should be popped from the back stack.
| Returns | |
|---|---|
KClass<*>? |
the destination route to pop up to, clearing all intervening destinations |
popUpToRouteObject
val popUpToRouteObject: Any?
Route from an Object for the destination to pop up to before navigating. When set, all non-matching destinations should be popped from the back stack.
| Returns | |
|---|---|
Any? |
the destination route to pop up to, clearing all intervening destinations |