NavDestination
open class NavDestination
kotlin.Any | |
↳ | 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.
Summary
Nested classes | |
---|---|
This optional annotation allows tooling to offer auto-complete for the |
Public constructors | |
---|---|
<init>(@NonNull : Navigator<out NavDestination!>) NavDestinations should be created via |
|
NavDestinations should be created via |
Public methods | |
---|---|
Unit |
addArgument(@NonNull : String, @NonNull : NavArgument) Sets an argument type for an argument name |
Unit |
addDeepLink(@NonNull : String) Add a deep link to this destination. |
Unit |
addDeepLink(@NonNull : NavDeepLink) Add a deep link to this destination. |
NavAction? |
Returns the destination ID for a given action. |
MutableMap<String!, NavArgument!> |
Get the arguments supported by this destination. |
Int |
getId() Returns the destination's unique ID. |
CharSequence? |
getLabel() Gets the descriptive label of this destination. |
String |
Returns the name associated with this destination's |
NavGraph? |
Gets the |
open Boolean |
hasDeepLink(@NonNull : Uri) Checks the given deep link |
open Boolean |
hasDeepLink(@NonNull : NavDeepLinkRequest) Checks the given |
open Unit |
onInflate(@NonNull : Context, @NonNull : AttributeSet) Called when inflating a destination from a resource. |
Unit |
Sets a destination ID for an action ID. |
Unit |
Sets a destination ID for an action ID. |
Unit |
removeAction(@IdRes |