DynamicIncludeNavGraphBuilder


@NavDestinationDsl
public final class DynamicIncludeNavGraphBuilder extends NavDestinationBuilder


DSL for constructing a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph

Summary

Public constructors

DynamicIncludeNavGraphBuilder(
    @NonNull DynamicIncludeGraphNavigator dynamicIncludeGraphNavigator,
    @IdRes int id,
    @NonNull String moduleName,
    @NonNull String graphResourceName
)

This method is deprecated. Use routes to create your DynamicIncludeNavGraphBuilder instead

DynamicIncludeNavGraphBuilder(
    @NonNull DynamicIncludeGraphNavigator dynamicIncludeGraphNavigator,
    @NonNull String route,
    @NonNull String moduleName,
    @NonNull String graphResourceName
)
@ExperimentalSafeArgsApi
DynamicIncludeNavGraphBuilder(
    @NonNull DynamicIncludeGraphNavigator dynamicIncludeGraphNavigator,
    @NonNull KClass<@NonNull ?> route,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap,
    @NonNull String moduleName,
    @NonNull String graphResourceName
)

DSL for constructing a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph

Public methods

@NonNull DynamicIncludeGraphNavigator.DynamicIncludeNavGraph
final String

Destination NavGraph's resource package as defined in the module's AndroidManifest.

final void
setGraphPackage(String graphPackage)

Destination NavGraph's resource package as defined in the module's AndroidManifest.

Inherited methods

From androidx.navigation.NavDestinationBuilder
final void
action(
    int actionId,
    @ExtensionFunctionType @NonNull Function1<@NonNull NavActionBuilderUnit> actionBuilder
)

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

final void
argument(
    @NonNull String name,
    @ExtensionFunctionType @NonNull Function1<@NonNull NavArgumentBuilderUnit> argumentBuilder
)

Add a NavArgument to this destination.

final void

Add a NavArgument to this destination.

final void

Add a deep link to this destination.

final void

Add a deep link to this destination.

final void
deepLink(@NonNull String uriPattern)

Add a deep link to this destination.

final int

The destination's unique ID.

final CharSequence

The descriptive label of the destination

final @NonNull Navigator<@NonNull DynamicIncludeGraphNavigator.DynamicIncludeNavGraph>

The navigator the destination that will be used in instantiateDestination to create the destination.

final String

The destination's unique route.

@NonNull DynamicIncludeGraphNavigator.DynamicIncludeNavGraph

Instantiate a new instance of D that will be passed to build.

final void

The descriptive label of the destination

Public constructors

DynamicIncludeNavGraphBuilder

Added in 2.3.0
Deprecated in 2.4.0
public DynamicIncludeNavGraphBuilder(
    @NonNull DynamicIncludeGraphNavigator dynamicIncludeGraphNavigator,
    @IdRes int id,
    @NonNull String moduleName,
    @NonNull String graphResourceName
)

DynamicIncludeNavGraphBuilder

Added in 2.4.0
public DynamicIncludeNavGraphBuilder(
    @NonNull DynamicIncludeGraphNavigator dynamicIncludeGraphNavigator,
    @NonNull String route,
    @NonNull String moduleName,
    @NonNull String graphResourceName
)

DynamicIncludeNavGraphBuilder

Added in 2.8.0-alpha07
@ExperimentalSafeArgsApi
public DynamicIncludeNavGraphBuilder(
    @NonNull DynamicIncludeGraphNavigator dynamicIncludeGraphNavigator,
    @NonNull KClass<@NonNull ?> route,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap,
    @NonNull String moduleName,
    @NonNull String graphResourceName
)

DSL for constructing a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph

Parameters
@NonNull DynamicIncludeGraphNavigator dynamicIncludeGraphNavigator

navigator used to create the destination

@NonNull KClass<@NonNull ?> route

the graph's unique route as a KClass

@NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap

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

@NonNull String moduleName

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

@NonNull String graphResourceName

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

Returns
DynamicIncludeNavGraphBuilder

the newly created NavGraph

Public methods

getGraphPackage

Added in 2.3.0
public final String getGraphPackage()

Destination NavGraph's resource package as defined in the module's AndroidManifest. This generally does not need to be manually set and will be set applicationId.moduleName if left null.

This cannot be an empty string.

setGraphPackage

Added in 2.3.0
public final void setGraphPackage(String graphPackage)

Destination NavGraph's resource package as defined in the module's AndroidManifest. This generally does not need to be manually set and will be set applicationId.moduleName if left null.

This cannot be an empty string.