androidx.navigation.dynamicfeatures


Classes

DynamicActivityNavigator

Dynamic feature navigator for Activity destinations.

DynamicActivityNavigator.Destination

Destination for DynamicActivityNavigator.

DynamicActivityNavigatorDestinationBuilder

DSL for constructing a new DynamicActivityNavigator.Destination

DynamicExtras

Extras for dynamic navigators.

DynamicGraphNavigator

Navigator for graphs in dynamic feature modules.

DynamicGraphNavigator.DynamicNavGraph

The NavGraph for dynamic features.

DynamicIncludeGraphNavigator

Navigator for include-dynamic.

DynamicIncludeGraphNavigator.DynamicIncludeNavGraph

The graph for dynamic-include.

DynamicIncludeNavGraphBuilder

DSL for constructing a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph

DynamicInstallManager

Install manager for dynamic features.

DynamicInstallMonitor

Monitor installation progress of dynamic feature modules.

DynamicNavGraphBuilder

DSL for constructing a new DynamicGraphNavigator.DynamicNavGraph

Extension functions summary

inline Unit

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

inline Unit

Construct a new DynamicActivityNavigator.Destination

inline Unit
<T : Any> DynamicNavGraphBuilder.activity(
    typeMap: Map<KTypeNavType<*>>,
    builder: DynamicActivityNavigatorDestinationBuilder.() -> Unit
)

Construct a new DynamicActivityNavigator.Destination

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

This function is deprecated. Use routes to create your dynamic NavGraph instead

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

This function is deprecated. Use routes to create your dynamic NavGraph instead

inline NavGraph
NavController.createGraph(
    startDestination: String,
    route: String?,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

inline NavGraph
NavHost.createGraph(
    startDestination: String,
    route: String?,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

inline NavGraph
NavController.createGraph(
    startDestination: Any,
    route: KClass<*>?,
    typeMap: Map<KTypeNavType<*>>,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

inline NavGraph
NavHost.createGraph(
    startDestination: Any,
    route: KClass<*>?,
    typeMap: Map<KTypeNavType<*>>,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

inline NavGraph
NavController.createGraph(
    startDestination: KClass<*>,
    route: KClass<*>?,
    typeMap: Map<KTypeNavType<*>>,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

inline NavGraph
NavHost.createGraph(
    startDestination: KClass<*>,
    route: KClass<*>?,
    typeMap: Map<KTypeNavType<*>>,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

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

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

inline Unit
<T : Any> DynamicNavGraphBuilder.includeDynamic(
    moduleName: String,
    graphResourceName: String,
    typeMap: Map<KTypeNavType<*>>
)

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

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
<T : Any> DynamicNavGraphBuilder.includeDynamic(
    moduleName: String,
    graphResourceName: String,
    typeMap: Map<KTypeNavType<*>>,
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
)

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

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

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

inline NavGraph
NavigatorProvider.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(
    id: @IdRes Int,
    startDestination: @IdRes Int,
    builder: DynamicNavGraphBuilder.() -> Unit
)

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

inline Unit
<T : Any> DynamicNavGraphBuilder.navigation(
    startDestination: Any,
    typeMap: Map<KTypeNavType<*>>,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a nested DynamicGraphNavigator.DynamicNavGraph

inline Unit
<T : Any> DynamicNavGraphBuilder.navigation(
    startDestination: KClass<*>,
    typeMap: Map<KTypeNavType<*>>,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a nested DynamicGraphNavigator.DynamicNavGraph

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

Construct a new DynamicGraphNavigator.DynamicNavGraph

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

Construct a nested DynamicGraphNavigator.DynamicNavGraph

inline NavGraph
NavigatorProvider.navigation(
    startDestination: Any,
    route: KClass<*>?,
    typeMap: Map<KTypeNavType<*>>,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a new DynamicGraphNavigator.DynamicNavGraph

inline NavGraph
NavigatorProvider.navigation(
    startDestination: KClass<*>,
    route: KClass<*>?,
    typeMap: Map<KTypeNavType<*>>,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a new DynamicGraphNavigator.DynamicNavGraph

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 DynamicNavGraphBuilder.activity(route: String, builder: DynamicActivityNavigatorDestinationBuilder.() -> Unit): Unit

Construct a new DynamicActivityNavigator.Destination

Parameters
route: String

Destination route.

builder: DynamicActivityNavigatorDestinationBuilder.() -> Unit

the builder used to construct the graph

inline fun <T : Any> DynamicNavGraphBuilder.activity(
    typeMap: Map<KTypeNavType<*>> = emptyMap(),
    builder: DynamicActivityNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicActivityNavigator.Destination

Parameters
<T : Any>

Destination route from a KClass

typeMap: Map<KTypeNavType<*>> = emptyMap()

A mapping of KType to custom NavType<*> in the T. May be empty if T does not use custom NavTypes.

builder: DynamicActivityNavigatorDestinationBuilder.() -> Unit

the builder used to construct the graph

inline fun NavController.createGraph(
    id: @IdRes Int = 0,
    startDestination: @IdRes Int,
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

inline fun NavHost.createGraph(
    id: @IdRes Int = 0,
    startDestination: @IdRes Int,
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

inline fun NavController.createGraph(
    startDestination: String,
    route: String? = null,
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

inline fun NavHost.createGraph(
    startDestination: String,
    route: String? = null,
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

inline fun NavController.createGraph(
    startDestination: Any,
    route: KClass<*>? = null,
    typeMap: Map<KTypeNavType<*>> = emptyMap(),
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

Parameters
startDestination: Any

the starting destination's route from an Object for this NavGraph. The respective NavDestination must be added as a KClass in order to match.

route: KClass<*>? = null

the graph's unique route from a KClass

typeMap: Map<KTypeNavType<*>> = emptyMap()

A mapping of KType to custom NavType<*> in the route. May be empty if route does not use custom NavTypes.

builder: DynamicNavGraphBuilder.() -> Unit

the builder used to construct the graph

inline fun NavHost.createGraph(
    startDestination: Any,
    route: KClass<*>? = null,
    typeMap: Map<KTypeNavType<*>> = emptyMap(),
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

Parameters
startDestination: Any

the starting destination's route from an Object for this NavGraph. The respective NavDestination must be added as a KClass in order to match.

route: KClass<*>? = null

the graph's unique route from a KClass

typeMap: Map<KTypeNavType<*>> = emptyMap()

A mapping of KType to custom NavType<*> in the route. May be empty if route does not use custom NavTypes.

builder: DynamicNavGraphBuilder.() -> Unit

the builder used to construct the graph

inline fun NavController.createGraph(
    startDestination: KClass<*>,
    route: KClass<*>? = null,
    typeMap: Map<KTypeNavType<*>> = emptyMap(),
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

Parameters
startDestination: KClass<*>

the starting destination's route from a KClass for this NavGraph. The respective NavDestination must be added as a KClass in order to match.

route: KClass<*>? = null

the graph's unique route from a KClass

typeMap: Map<KTypeNavType<*>> = emptyMap()

A mapping of KType to custom NavType<*> in the route. May be empty if route does not use custom NavTypes.

builder: DynamicNavGraphBuilder.() -> Unit

the builder used to construct the graph

inline fun NavHost.createGraph(
    startDestination: KClass<*>,
    route: KClass<*>? = null,
    typeMap: Map<KTypeNavType<*>> = emptyMap(),
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

Parameters
startDestination: KClass<*>

the starting destination's route from a KClass for this NavGraph. The respective NavDestination must be added as a KClass in order to match.

route: KClass<*>? = null

the graph's unique route from a KClass

typeMap: Map<KTypeNavType<*>> = emptyMap()

A mapping of KType to custom NavType<*> in the route. May be empty if route does not use custom NavTypes.

builder: DynamicNavGraphBuilder.() -> Unit

the builder used to construct the graph

includeDynamic

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 <T : Any> DynamicNavGraphBuilder.includeDynamic(
    moduleName: String,
    graphResourceName: String,
    typeMap: Map<KTypeNavType<*>> = emptyMap()
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
<T : Any>

the graph's unique route as a KClass

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.

typeMap: Map<KTypeNavType<*>> = emptyMap()

A mapping of KType to custom NavType<*> in the T. May be empty if T does not use custom NavTypes.

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.

includeDynamic

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 <T : Any> DynamicNavGraphBuilder.includeDynamic(
    moduleName: String,
    graphResourceName: String,
    typeMap: Map<KTypeNavType<*>> = emptyMap(),
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
<T : Any>

the graph's unique route as a KClass

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.

typeMap: Map<KTypeNavType<*>> = emptyMap()

A mapping of KType to custom NavType<*> in the T. May be empty if T does not use custom NavTypes.

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 NavigatorProvider.navigation(
    id: @IdRes Int = 0,
    startDestination: @IdRes Int,
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new DynamicGraphNavigator.DynamicNavGraph

Parameters
id: @IdRes Int = 0

NavGraph id.

startDestination: @IdRes Int

Id start destination in the graph

builder: DynamicNavGraphBuilder.() -> 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 <T : Any> DynamicNavGraphBuilder.navigation(
    startDestination: Any,
    typeMap: Map<KTypeNavType<*>> = emptyMap(),
    builder: DynamicNavGraphBuilder.() -> Unit
): Unit

Construct a nested DynamicGraphNavigator.DynamicNavGraph

Parameters
<T : Any>

the graph's unique route as a KClass

startDestination: Any

the starting destination's route from an Object for this NavGraph. The respective NavDestination must be added with route from a KClass in order to match.

typeMap: Map<KTypeNavType<*>> = emptyMap()

A mapping of KType to custom NavType<*> in the T. May be empty if T does not use custom NavTypes.

builder: DynamicNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun <T : Any> DynamicNavGraphBuilder.navigation(
    startDestination: KClass<*>,
    typeMap: Map<KTypeNavType<*>> = emptyMap(),
    builder: DynamicNavGraphBuilder.() -> Unit
): Unit

Construct a nested DynamicGraphNavigator.DynamicNavGraph

Parameters
<T : Any>

the graph's unique route as a KClass

startDestination: KClass<*>

the starting destination's route from a KClass for this NavGraph. The respective NavDestination must be added with route from a KClass in order to match.

typeMap: Map<KTypeNavType<*>> = emptyMap()

A mapping of KType to custom NavType<*> in the T. May be empty if T does not use custom NavTypes.

builder: DynamicNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun NavigatorProvider.navigation(
    startDestination: String,
    route: String? = null,
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new DynamicGraphNavigator.DynamicNavGraph

Parameters
startDestination: String

route start destination in the graph

route: String? = null

NavGraph route.

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.

inline fun NavigatorProvider.navigation(
    startDestination: Any,
    route: KClass<*>? = null,
    typeMap: Map<KTypeNavType<*>> = emptyMap(),
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new DynamicGraphNavigator.DynamicNavGraph

Parameters
startDestination: Any

the starting destination's route from an Object for this NavGraph. The respective NavDestination must be added with route from a KClass in order to match.

route: KClass<*>? = null

the graph's unique route as a KClass

typeMap: Map<KTypeNavType<*>> = emptyMap()

A mapping of KType to custom NavType<*> in the route. May be empty if route does not use custom NavTypes.

builder: DynamicNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun NavigatorProvider.navigation(
    startDestination: KClass<*>,
    route: KClass<*>? = null,
    typeMap: Map<KTypeNavType<*>> = emptyMap(),
    builder: DynamicNavGraphBuilder.() -> Unit
): NavGraph

Construct a new DynamicGraphNavigator.DynamicNavGraph

Parameters
startDestination: KClass<*>

the starting destination's route from a KClass for this NavGraph. The respective NavDestination must be added with route from a KClass in order to match.

route: KClass<*>? = null

the graph's unique route as a KClass

typeMap: Map<KTypeNavType<*>> = emptyMap()

A mapping of KType to custom NavType<*> in the route. May be empty if route does not use custom NavTypes.

builder: DynamicNavGraphBuilder.() -> Unit

Another builder for chaining.