NavOptions

public final class NavOptions


NavOptions stores special options for navigate actions

Summary

Nested types

NavOptions.Builder

Builder for constructing new instances of NavOptions.

Public fields

final int

The custom enter Animation/Animator that should be run.

final int

The custom exit Animation/Animator that should be run.

final int

The custom enter Animation/Animator that should be run when this destination is popped from the back stack.

final int

The custom exit Animation/Animator that should be run when this destination is popped from the back stack.

final @IdRes int

The destination to pop up to before navigating.

final String

Route for the destination to pop up to before navigating.

Public methods

boolean
equals(Object other)
final @IdRes int

This method is deprecated. Use popUpToId instead.

int
final boolean

Whether the destination set in getPopUpTo should be popped from the back stack.

final 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 boolean

Whether the back stack and the state of all destinations between the current destination and popUpToId should be saved for later restoration via Builder.setRestoreState or the restoreState attribute using the same ID as popUpToId (note: this matching ID is true whether isPopUpToInclusive is true or false).

final boolean

Whether this navigation action should restore any state previously saved by Builder.setPopUpTo or the popUpToSaveState attribute.

Public fields

enterAnim

public final int enterAnim

The custom enter Animation/Animator that should be run.

Returns
int

the resource id of a Animation or Animator or -1 if none.

exitAnim

public final int exitAnim

The custom exit Animation/Animator that should be run.

Returns
int

the resource id of a Animation or Animator or -1 if none.

popEnterAnim