NavOptions
public final class NavOptions
NavOptions stores special options for navigate actions
Summary
Nested types
Builder for constructing new instances of NavOptions.
Public fields
final @NonNull int
The custom enter Animation/Animator that should be run.
final @NonNull int
The custom exit Animation/Animator that should be run.
final @NonNull int
The custom enter Animation/Animator that should be run when this destination is popped from the back stack.
final @NonNull int
The custom exit Animation/Animator that should be run when this destination is popped from the back stack.
The destination to pop up to before navigating.
Route for the destination to pop up to before navigating.
Public methods
This method is deprecated. Use popUpToId instead.
final @NonNull boolean
Whether the destination set in
final @NonNull 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).
final @NonNull boolean
Whether the back stack and the state of all destinations between the current destination and restoreState attribute using the same ID as
final @NonNull boolean
Whether this navigation action should restore any state previously saved by popUpToSaveState attribute.
Public fields
enterAnim
The custom enter Animation/Animator that should be run.
Returns
the resource id of a Animation or Animator or -1 if none.
exitAnim
The custom exit Animation/Animator that should be run.
Returns
the resource id of a Animation or Animator or -1 if none.
popEnterAnim
The custom enter Animation/Animator that should be run when this destination is popped from the back stack.
Returns
the resource id of a Animation or Animator or -1 if none.
popExitAnim
The custom exit Animation/Animator that should be run when this destination is popped from the back stack.
Returns
the resource id of a Animation or Animator or -1 if none.
popUpToId
The destination to pop up to before navigating. When set, all non-matching destinations should be popped from the back stack.
Returns
the destinationId to pop up to, clearing all intervening destinations
popUpToRoute
Route for the destination to pop up to before navigating. When set, all non-matching destinations should be popped from the back stack.
Returns
the destination route to pop up to, clearing all intervening destinations
Public methods
getPopUpTo
This method is deprecated.
Use popUpToId instead.
The destination to pop up to before navigating. When set, all non-matching destinations should be popped from the back stack.
Returns
the destinationId to pop up to, clearing all intervening destinations
hashCode
isPopUpToInclusive
Whether the destination set in
shouldLaunchSingleTop
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
shouldPopUpToSaveState
Whether the back stack and the state of all destinations between the current destination and restoreState attribute using the same ID as
shouldRestoreState
Whether this navigation action should restore any state previously saved by popUpToSaveState attribute.