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

NavOptions

class NavOptions
kotlin.Any
   ↳ androidx.navigation.NavOptions

NavOptions stores special options for navigate actions

Summary

Nested classes

Builder for constructing new instances of NavOptions.

Public methods
Boolean
equals(other: Any?)

Int

The custom enter Animation/Animator that should be run.

Int

The custom exit Animation/Animator that should be run.

Int

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

Int

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

Int

The destination to pop up to before navigating.

Int

Boolean

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

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).

Public methods

equals

fun equals(other: Any?): Boolean

getEnterAnim

@AnimRes @AnimatorRes fun getEnterAnim(): Int

The custom enter Animation/Animator that should be run.

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

getExitAnim

@AnimRes @AnimatorRes fun getExitAnim(): Int

The custom exit Animation/Animator that should be run.

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

getPopEnterAnim

@AnimRes @AnimatorRes fun getPopEnterAnim(): Int

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

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

getPopExitAnim

@AnimRes @AnimatorRes fun getPopExitAnim(): Int

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

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

getPopUpTo

@IdRes fun getPopUpTo(): Int

The destination to pop up to before navigating. When set, all non-matching destinations should be popped from the back stack.

Return
Int the destinationId to pop up to, clearing all intervening destinations

hashCode

fun hashCode(): Int

isPopUpToInclusive

fun isPopUpToInclusive(): Boolean

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

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 activites.