ActivityNavigator.Destination

@NavDestination.ClassType(value = Activity) public class ActivityNavigator.Destination extends NavDestination


NavDestination for activity navigation

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

Summary

Public fields

final String

The action used to start the Activity, if any

final ComponentName

The explicit ComponentName associated with this destination, if any

final Uri

The data URI used to start the Activity, if any

final String

The dynamic data URI pattern, if any

final Intent

The Intent associated with this destination.

final String

The explicit application package name associated with this destination, if any

Public constructors

Destination(NavigatorProvider navigatorProvider)

Construct a new activity destination.

Public methods

boolean
equals(Object other)
int
@CallSuper void
onInflate(Context context, AttributeSet attrs)

Called when inflating a destination from a resource.

final @NonNull ActivityNavigator.Destination
setAction(String action)

Sets the action sent when navigating to this destination.

final @NonNull ActivityNavigator.Destination

Set an explicit ComponentName to navigate to.

final @NonNull ActivityNavigator.Destination
setData(Uri data)

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

final @NonNull ActivityNavigator.Destination
setDataPattern(String dataPattern)

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

final @NonNull ActivityNavigator.Destination
setIntent(Intent intent)

Set the Intent to start when navigating to this destination.

final @NonNull ActivityNavigator.Destination
setTargetPackage(String packageName)

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

@NonNull String

Inherited methods

From class NavDestination
final void
addArgument(String argumentName, NavArgument argument)

Sets an argument type for an argument name

final void
addDeepLink(NavDeepLink navDeepLink)

Add a deep link to this destination.

final void
addDeepLink(String uriPattern)

Add a deep link to this destination.

final NavAction
getAction(@IdRes int id)

Returns the NavAction for the given action ID.

boolean
hasDeepLink(Uri deepLink)

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

boolean

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

final void
putAction(@IdRes int actionId, NavAction action)

Sets the NavAction destination for an action ID.

final void
putAction(@IdRes int actionId, @IdRes int destId)

Creates a NavAction for the given destId and associates it with the actionId.

final void
removeAction(@IdRes int actionId)

Unsets the NavAction for an action ID.

final void
removeArgument(String argumentName)

Unsets the argument type for an argument name.

Public fields

action

public final String