Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

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 getPopUpTo() should be popped from the back stack.

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