Google is committed to advancing racial equity for Black communities. See how.

Destination

open class Destination : NavDestination
kotlin.Any
   ↳ androidx.navigation.NavDestination
   ↳ androidx.navigation.ActivityNavigator.Destination

NavDestination for activity navigation

Summary

Public constructors
<init>(@NonNull navigatorProvider: NavigatorProvider)

Construct a new activity destination.

<init>(@NonNull activityNavigator: Navigator<out ActivityNavigator.Destination!>)

Construct a new activity destination.

Public methods
String?

Get the action used to start the Activity, if any

ComponentName?

Get the explicit ComponentName associated with this destination, if any

Uri?

Get the data URI used to start the Activity, if any

String?

Gets the dynamic data URI pattern, if any

Intent?

Gets the Intent associated with this destination.

String?

Get the explicit application package name associated with this destination, if any

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

ActivityNavigator.Destination
setAction(@Nullable action: String?)

Sets the action sent when navigating to this destination.

ActivityNavigator.Destination
setComponentName(@Nullable name: ComponentName?)

Set an explicit ComponentName to navigate to.

ActivityNavigator.Destination
setData(@Nullable data: Uri?)

Sets a static data URI that is sent when navigating to this destination.

ActivityNavigator.Destination
setDataPattern(@Nullable dataPattern: String?)

Sets a dynamic data URI pattern that is sent when navigating to this destination.

ActivityNavigator.Destination
setIntent(@Nullable intent: Intent?)

Set the Intent to start when navigating to this destination.

ActivityNavigator.Destination
setTargetPackage(@Nullable packageName: String?)

Set an explicit application package name that limits the components this destination will navigate to.

open String

Inherited functions

Public constructors

<init>

Destination(@NonNull navigatorProvider: NavigatorProvider)

Construct a new activity destination. This destination is not valid until you set the Intent via setIntent(Intent) or one or more of the other set method.

Parameters
navigatorProvider NavigatorProvider: The NavController which this destination will be associated with.

<init>

Destination(@NonNull activityNavigator: Navigator<out ActivityNav