public class

FragmentNavigator.Destination

extends NavDestination

 java.lang.Object

androidx.navigation.NavDestination

↳androidx.navigation.fragment.FragmentNavigator.Destination

Overview

NavDestination specific to FragmentNavigator

Summary

Constructors
publicDestination(Navigator<FragmentNavigator.Destination> fragmentNavigator)

Construct a new fragment destination.

publicDestination(NavigatorProvider navigatorProvider)

Construct a new fragment destination.

Methods
public final java.lang.StringgetClassName()

Gets the Fragment's class name associated with this destination

public voidonInflate(Context context, AttributeSet attrs)

Called when inflating a destination from a resource.

public final FragmentNavigator.DestinationsetClassName(java.lang.String className)

Set the Fragment class name associated with this destination

public java.lang.StringtoString()

from NavDestinationaddArgument, addDeepLink, addDeepLink, getAction, getArguments, getDisplayName, getId, getLabel, getNavigatorName, getParent, hasDeepLink, parseClassFromName, putAction, putAction, removeAction, removeArgument, setId, setLabel
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructors

public Destination(NavigatorProvider navigatorProvider)

Construct a new fragment destination. This destination is not valid until you set the Fragment via FragmentNavigator.Destination.setClassName(String).

Parameters:

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

public Destination(Navigator<FragmentNavigator.Destination> fragmentNavigator)

Construct a new fragment destination. This destination is not valid until you set the Fragment via FragmentNavigator.Destination.setClassName(String).

Parameters:

fragmentNavigator: The FragmentNavigator which this destination will be associated with. Generally retrieved via a NavController's NavigatorProvider.getNavigator(Class) method.

Methods

public void onInflate(Context context, AttributeSet attrs)

Called when inflating a destination from a resource.

Parameters:

context: local context performing inflation
attrs: attrs to parse during inflation

public final FragmentNavigator.Destination setClassName(java.lang.String className)

Set the Fragment class name associated with this destination

Parameters:

className: The class name of the Fragment to show when you navigate to this destination

Returns:

this FragmentNavigator.Destination

public final java.lang.String getClassName()

Gets the Fragment's class name associated with this destination

public java.lang.String toString()