@NavDestinationDsl
class DynamicNavGraphBuilder : NavGraphBuilder


DSL for constructing a new DynamicGraphNavigator.DynamicNavGraph

Summary

Public constructors

DynamicNavGraphBuilder(
    provider: NavigatorProvider,
    id: @IdRes Int,
    startDestination: @IdRes Int
)

This function is deprecated. Use routes to create your DynamicNavGraphBuilder instead

DynamicNavGraphBuilder(
    provider: NavigatorProvider,
    startDestination: String,
    route: String?
)

Public functions

open NavGraph

Public properties

String?

The module name of this Destination's dynamic feature module.

Int

ID of the destination displayed during module installation.

String?

Route of the destination displayed during module installation.

Extension functions

inline Unit

This function is deprecated. Use routes to build your DynamicActivityDestination instead

inline Unit

Construct a new DynamicActivityNavigator.Destination

inline Unit

This function is deprecated. Use routes to create your DynamicFragmentDestination instead

inline Unit

Construct a new DynamicFragmentNavigator.Destination

inline Unit

This function is deprecated. Use routes to create your DynamicFragmentDestination instead

inline Unit

Construct a new DynamicFragmentNavigator.Destination

inline Unit
DynamicNavGraphBuilder.fragment(
    id: @IdRes Int,
    fragmentClassName: String,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
)

This function is deprecated. Use routes to create your DynamicFragmentDestination instead

inline Unit
DynamicNavGraphBuilder.fragment(
    route: String,
    fragmentClassName: String,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
)

Construct a new DynamicFragmentNavigator.Destination

inline Unit
DynamicNavGraphBuilder.includeDynamic(
    id: @IdRes Int,
    moduleName: String,
    graphResourceName: String
)

This function is deprecated. Use routes to include your DynamicNavGraph instead

inline Unit
DynamicNavGraphBuilder.includeDynamic(
    route: String,
    moduleName: String,
    graphResourceName: String
)

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

inline Unit
DynamicNavGraphBuilder.includeDynamic(
    id: @IdRes Int,
    moduleName: String,
    graphResourceName: String,
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
)

This function is deprecated. Use routes to include your DynamicNavGraph instead

inline Unit
DynamicNavGraphBuilder.includeDynamic(
    route: String,
    moduleName: String,
    graphResourceName: String,
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
)

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

inline Unit
DynamicNavGraphBuilder.navigation(
    id: @IdRes Int,
    startDestination: @IdRes Int,
    builder: DynamicNavGraphBuilder.() -> Unit
)

This function is deprecated. Use routes to create your DynamicNavGraph instead

inline Unit
DynamicNavGraphBuilder.navigation(
    startDestination: String,
    route: String,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a nested DynamicGraphNavigator.DynamicNavGraph

Inherited functions

From androidx.navigation.NavDestinationBuilder
Unit
action(actionId: Int, actionBuilder: NavActionBuilder.() -> Unit)

This function is deprecated. Building NavDestinations using IDs with the Kotlin DSL has been deprecated in favor of using routes.

Unit
argument(name: String, argumentBuilder: NavArgumentBuilder.() -> Unit)

Add a NavArgument to this destination.

Unit
deepLink(navDeepLink: NavDeepLinkDslBuilder.() -> Unit)

Add a deep link to this destination.

Unit
deepLink(uriPattern: String)

Add a deep link to this destination.

From androidx.navigation.NavGraphBuilder
Unit

Add the destination to the NavGraphBuilder

Unit
<D : NavDestination> destination(navDestination: NavDestinationBuilder<D>)

Build and add a new destination to the NavGraphBuilder

operator Unit

Adds this destination to the NavGraphBuilder

Inherited properties

From androidx.navigation.NavDestinationBuilder
Int

The destination's unique ID.

CharSequence?

The descriptive label of the destination

Navigator<NavGraph>

The navigator the destination was created from

String?

The destination's unique route.

From androidx.navigation.NavGraphBuilder

Public constructors

DynamicNavGraphBuilder

Added in 2.3.0
Deprecated in 2.4.0
DynamicNavGraphBuilder(
    provider: NavigatorProvider,
    id: @IdRes Int,
    startDestination: @IdRes Int
)

DynamicNavGraphBuilder

Added in 2.4.0
DynamicNavGraphBuilder(
    provider: NavigatorProvider,
    startDestination: String,
    route: String? = null
)

Public functions

build

open fun build(): NavGraph

Public properties

moduleName

Added in 2.3.0
var moduleNameString?

The module name of this Destination's dynamic feature module. This has to be the same as defined in the dynamic feature module's AndroidManifest.xml file.

progressDestination

Added in 2.3.0
var progressDestinationInt

ID of the destination displayed during module installation. This generally does not need to be set, but is instead filled in by the NavHost via DynamicGraphNavigator.installDefaultProgressDestination.

Setting this clears any previously set progressDestinationRoute.

progressDestinationRoute

Added in 2.4.0
var progressDestinationRouteString?

Route of the destination displayed during module installation. This generally does not need to be set, but is instead filled in by the NavHost via DynamicGraphNavigator.installDefaultProgressDestination.

Setting this overrides any previously set progressDestination.

Extension functions

inline fun DynamicNavGraphBuilder.activity(id: @IdRes Int, builder: DynamicActivityNavigatorDestinationBuilder.() -> Unit): Unit

Construct a new DynamicActivityNavigator.Destination

Parameters
id: @IdRes Int

Destination id.

inline fun <F : Fragment> DynamicNavGraphBuilder.fragment(id: @IdRes Int): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
id: @IdRes Int

Destination id.

inline fun <F : Fragment> DynamicNavGraphBuilder.fragment(route: String): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
route: String

Destination route.

inline fun <F : Fragment> DynamicNavGraphBuilder.fragment(
    id: @IdRes Int,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
id: @IdRes Int

Destination id.

inline fun <F : Fragment> DynamicNavGraphBuilder.fragment(
    route: String,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
route: String

Destination route.

inline fun DynamicNavGraphBuilder.fragment(
    id: @IdRes Int,
    fragmentClassName: String,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
id: @IdRes Int

Destination id.

fragmentClassName: String

Fully qualified class name of destination Fragment.

inline fun DynamicNavGraphBuilder.fragment(
    route: String,
    fragmentClassName: String,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
route: String

Destination route.

fragmentClassName: String

Fully qualified class name of destination Fragment.

inline fun DynamicNavGraphBuilder.includeDynamic(
    id: @IdRes Int,
    moduleName: String,
    graphResourceName: String
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
id: @IdRes Int

NavGraph id.

moduleName: String

Dynamic feature module name as defined in the module's AndroidManifest. This must not be an empty string.

graphResourceName: String

Graph's resource name without the navigation qualifier. This must not be an empty string.

inline fun DynamicNavGraphBuilder.includeDynamic(
    route: String,
    moduleName: String,
    graphResourceName: String
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
route: String

NavGraph route.

moduleName: String

Dynamic feature module name as defined in the module's AndroidManifest. This must not be an empty string.

graphResourceName: String

Graph's resource name without the navigation qualifier. This must not be an empty string.

inline fun DynamicNavGraphBuilder.includeDynamic(
    id: @IdRes Int,
    moduleName: String,
    graphResourceName: String,
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
id: @IdRes Int

NavGraph id.

moduleName: String

Dynamic feature module name as defined in the module's AndroidManifest. This must not be an empty string.

graphResourceName: String

Graph's resource name without the navigation qualifier. This must not be an empty string.

builder: DynamicIncludeNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun DynamicNavGraphBuilder.includeDynamic(
    route: String,
    moduleName: String,
    graphResourceName: String,
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
route: String

NavGraph route.

moduleName: String

Dynamic feature module name as defined in the module's AndroidManifest. This must not be an empty string.

graphResourceName: String

Graph's resource name without the navigation qualifier. This must not be an empty string.

builder: DynamicIncludeNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun DynamicNavGraphBuilder.navigation(
    id: @IdRes Int,
    startDestination: @IdRes Int,
    builder: DynamicNavGraphBuilder.() -> Unit
): Unit

Construct a nested DynamicGraphNavigator.DynamicNavGraph

Parameters
id: @IdRes Int

NavGraph id.

startDestination: @IdRes Int

Id start destination in the graph

builder: DynamicNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun DynamicNavGraphBuilder.navigation(
    startDestination: String,
    route: String,
    builder: DynamicNavGraphBuilder.() -> Unit
): Unit

Construct a nested DynamicGraphNavigator.DynamicNavGraph

Parameters
startDestination: String

route start destination in the graph

route: String

NavGraph route.

builder: DynamicNavGraphBuilder.() -> Unit

Another builder for chaining.