Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.


open class NavDestination
   ↳ androidx.navigation.NavDestination

NavDestination represents one node within an overall navigation graph.

Each destination is associated with a Navigator which knows how to navigate to this particular destination.

Destinations declare a set of actions that they support. These actions form a navigation API for the destination; the same actions declared on different destinations that fill similar roles allow application code to navigate based on semantic intent.

Each destination has a set of arguments that will be applied when navigating to that destination. Any default values for those arguments can be overridden at the time of navigation.


Nested classes

This optional annotation allows tooling to offer auto-complete for the android:name attribute.

Public constructors
<init>(@NonNull navigator: Navigator<out NavDestination!>)

NavDestinations should be created via Navigator#createDestination.

<init>(@NonNull navigatorName: String)

NavDestinations should be created via Navigator#createDestination.

Public methods
addArgument(@NonNull argumentName: String, @NonNull argument: NavArgument)

Sets an argument type for an argument name

addDeepLink(@NonNull uriPattern: String)

Add a deep link to this destination.

addDeepLink(@NonNull navDeepLink: NavDeepLink)

Add a deep link to this destination.

getAction(@IdRes id: Int)

Returns the destination ID for a given action.

MutableMap<String!, NavArgument!>

Get the arguments supported by this destination.


Returns the destination's unique ID.


Gets the descriptive label of this destination.


Returns the name associated with this destination's Navigator.


Gets the NavGraph that contains this destination.

open Boolean
hasDeepLink(@NonNull deepLink: Uri)

Checks the given deep link Uri, and determines whether it matches a Uri pattern added to the destination by a call to addDeepLink(String) .

open Boolean
hasDeepLink(@NonNull deepLinkRequest: NavDeepLinkRequest)

Checks the given NavDeepLinkRequest, and determines whether it matches a NavDeepLink added to the destination by a call to addDeepLink(NavDeepLink).

open Unit
onInflate(@NonNull context: Context, @NonNull attrs: AttributeSet)

Called when inflating a destination from a resource.

putAction(@IdRes actionId: Int, @IdRes destId: Int)

Sets a destination ID for an action ID.

putAction(@IdRes actionId: Int, @NonNull action