DynamicGraphNavigator.DynamicNavGraph


class DynamicGraphNavigator.DynamicNavGraph : NavGraph


The NavGraph for dynamic features.

Summary

Public constructors

DynamicNavGraph(
    navGraphNavigator: DynamicGraphNavigator,
    navigatorProvider: NavigatorProvider
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open Unit
onInflate(context: Context, attrs: AttributeSet)

Called when inflating a destination from a resource.

Public properties

String?

The dynamic feature's module name.

Int

Resource id of progress destination.

Inherited functions

From kotlin.collections.Iterable
From androidx.navigation.NavDestination
Unit
addArgument(argumentName: String, argument: NavArgument)

Sets an argument type for an argument name

Unit
addDeepLink(navDeepLink: NavDeepLink)

Add a deep link to this destination.

Unit
addDeepLink(uriPattern: String)

Add a deep link to this destination.

String?
fillInLabel(context: Context, bundle: Bundle?)

Parses a dynamic label containing arguments into a String.

NavAction?

Returns the NavAction for the given action ID.

open Boolean
hasDeepLink(deepLinkRequest: NavDeepLinkRequest)

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

open Boolean
hasDeepLink(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 .

Unit
putAction(actionId: @IdRes Int, action: NavAction)

Sets the NavAction destination for an action ID.

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

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

Unit
removeAction(actionId: @IdRes Int)

Unsets the NavAction for an action ID.

Unit
removeArgument(argumentName: String)

Unsets the argument type for an argument name.

From androidx.navigation.NavGraph
Unit
addAll(other: NavGraph)

Add all destinations from another collection to this one.

Unit

Adds a destination to this NavGraph.

Unit

Adds multiple destinations to this NavGraph.

Unit

Adds multiple destinations to this NavGraph.

Unit

Clear all destinations from this navigation graph.

inline NavDestination?
<T : Any?> findNode()

Finds a destination in the collection by route from KClass.

NavDestination?
findNode(resId: @IdRes Int)

Finds a destination in the collection by ID.

NavDestination?
<T : Any?> findNode(route: T?)

Finds a destination in the collection by route from Object.

NavDestination?
findNode(route: String?)

Finds a destination in the collection by route.

@IdRes Int

This function is deprecated. Use getStartDestinationId instead.

final operator MutableIterator<NavDestination>
Unit

Remove a given destination from this NavGraph

inline Unit

Sets the starting destination for this NavGraph.

Unit
setStartDestination(startDestId: Int)

Sets the starting destination for this NavGraph.

Unit
<T : Any> setStartDestination(startDestRoute: T)

Sets the starting destination for this NavGraph.

Unit
setStartDestination(startDestRoute: String)

Sets the starting destination for this NavGraph.

open String

Inherited properties

From androidx.navigation.NavDestination
Map<StringNavArgument>

The arguments supported by this destination.

Int

The destination's unique ID.

CharSequence?

The descriptive label of this destination.

String

The name associated with this destination's Navigator.

NavGraph?

Gets the NavGraph that contains this destination.

String?

The destination's unique route.

From androidx.navigation.NavGraph
Int

The starting destination id for this NavGraph.

String?

The route for the starting destination for this NavGraph.

Public constructors

DynamicNavGraph

Added in 2.3.0
DynamicNavGraph(
    navGraphNavigator: DynamicGraphNavigator,
    navigatorProvider: NavigatorProvider
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

onInflate

open fun onInflate(context: Context, attrs: AttributeSet): Unit

Called when inflating a destination from a resource.

Parameters
context: Context

local context performing inflation

attrs: AttributeSet

attrs to parse during inflation

Public properties

moduleName

Added in 2.3.0
var moduleNameString?

The dynamic feature's module name.

progressDestination

Added in 2.3.0
var progressDestinationInt

Resource id of progress destination. This will be preferred over any default progress destination set by installDefaultProgressDestination.