NavOptions
public
final
class
NavOptions
extends Object
| java.lang.Object | |
| ↳ | androidx.navigation.NavOptions |
NavOptions stores special options for navigate actions
Summary
Nested classes | |
|---|---|
class |
NavOptions.Builder
Builder for constructing new instances of NavOptions. |
Public methods | |
|---|---|
boolean
|
equals(Object o)
|
int
|
getEnterAnim()
The custom enter Animation/Animator that should be run. |
int
|
getExitAnim()
The custom exit Animation/Animator that should be run. |
int
|
getPopEnterAnim()
The custom enter Animation/Animator that should be run when this destination is popped from the back stack. |
int
|
getPopExitAnim()
The custom exit Animation/Animator that should be run when this destination is popped from the back stack. |
int
|
getPopUpTo()
The destination to pop up to before navigating. |
int
|
hashCode()
|
boolean
|
isPopUpToInclusive()
Whether the destination set in |
boolean
|
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). |
Inherited methods | |
|---|---|
Public methods
equals
public boolean equals (Object o)
| Parameters | |
|---|---|
o |
Object |
| Returns | |
|---|---|
boolean |
|
getEnterAnim
public int getEnterAnim ()
The custom enter Animation/Animator that should be run.
| Returns | |
|---|---|
int |
the resource id of a Animation or Animator or -1 if none. |
getExitAnim
public int getExitAnim ()
The custom exit Animation/Animator that should be run.
| Returns | |
|---|---|
int |
the resource id of a Animation or Animator or -1 if none. |
getPopEnterAnim
public int getPopEnterAnim ()
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. |
getPopExitAnim
public int getPopExitAnim ()
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. |
getPopUpTo
public int getPopUpTo ()
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 |
hashCode
public int hashCode ()
| Returns | |
|---|---|
int |
|
isPopUpToInclusive
public boolean isPopUpToInclusive ()
Whether the destination set in getPopUpTo() should be popped from the back stack.
| Returns | |
|---|---|
boolean |
|
shouldLaunchSingleTop
public boolean 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 Intent.FLAG_ACTIVITY_SINGLE_TOP
works with activites.
| Returns | |
|---|---|
boolean |
|
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-14 UTC.