DynamicNavGraphBuilder

public final class DynamicNavGraphBuilder extends NavDestinationBuilder, NavGraphBuilder

Object
   ↳ NavDestinationBuilder
     ↳ NavGraphBuilder
       ↳ DynamicNavGraphBuilder

DSL for constructing a new DynamicGraphNavigator.DynamicNavGraph

Summary

Public fields

final int

The destination's unique ID.

final @Nullable CharSequence

The descriptive label of the destination

final @Nullable String

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

final int

ID of the destination displayed during module installation.

final @Nullable String

Route of the destination displayed during module installation.

final @NonNull NavigatorProvider

The NavGraphBuilder's NavigatorProvider.

final @Nullable String

The destination's unique route.

Public constructors

DynamicNavGraphBuilder(
    @NonNull NavigatorProvider provider,
    @IdRes int id,
    @IdRes int startDestination
)
DynamicNavGraphBuilder(
    @NonNull NavigatorProvider provider,
    @NonNull String startDestination,
    @Nullable String route
)

Public methods

@NonNull NavGraph

Extension functions

final void

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

final void

Construct a new DynamicActivityNavigator.Destination

final void

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

final void

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

final void
DynamicFragmentNavigatorDestinationBuilderKt.fragment(
    @NonNull DynamicNavGraphBuilder receiver,
    @IdRes int id,
    @NonNull String fragmentClassName,
    @NonNull Function1<@NonNull DynamicFragmentNavigatorDestinationBuilderUnit> builder
)

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

final void

Construct a new DynamicFragmentNavigator.Destination

final void

Construct a new DynamicFragmentNavigator.Destination

final void

Construct a new DynamicFragmentNavigator.Destination

final void
DynamicIncludeNavGraphBuilderKt.includeDynamic(
    @NonNull DynamicNavGraphBuilder receiver,
    @IdRes int id,
    @NonNull String moduleName,
    @NonNull String graphResourceName
)

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

final void
DynamicIncludeNavGraphBuilderKt.includeDynamic(
    @NonNull DynamicNavGraphBuilder receiver,
    @IdRes int id,
    @NonNull String moduleName,
    @NonNull String graphResourceName,
    @NonNull Function1<@NonNull DynamicIncludeNavGraphBuilderUnit> builder
)

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

final void
DynamicIncludeNavGraphBuilderKt.includeDynamic(
    @NonNull DynamicNavGraphBuilder receiver,
    @NonNull String route,
    @NonNull String moduleName,
    @NonNull String graphResourceName
)

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

final void
DynamicIncludeNavGraphBuilderKt.includeDynamic(
    @NonNull DynamicNavGraphBuilder receiver,
    @NonNull String route,
    @NonNull String moduleName,
    @NonNull String graphResourceName,
    @NonNull Function1<@NonNull DynamicIncludeNavGraphBuilderUnit> builder
)

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

final void
DynamicNavGraphBuilderKt.navigation(
    @NonNull DynamicNavGraphBuilder receiver,
    @IdRes int id,
    @IdRes int startDestination,
    @NonNull Function1<@NonNull DynamicNavGraphBuilderUnit> builder
)

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

final void
DynamicNavGraphBuilderKt.navigation(
    @NonNull DynamicNavGraphBuilder receiver,
    @NonNull String startDestination,
    @NonNull String route,
    @NonNull Function1<@NonNull DynamicNavGraphBuilderUnit> builder
)

Construct a nested DynamicGraphNavigator.DynamicNavGraph

Inherited methods

From class NavDestinationBuilder
final void
action(
    int actionId,
    @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,
    @NonNull Function1<@NonNull NavArgumentBuilderUnit> argumentBuilder
)

Add a NavArgument to this destination.

final void
deepLink(
    @NonNull Function1<@NonNull NavDeepLinkDslBuilderUnit> navDeepLink
)

Add a deep link to this destination.

final void
deepLink(@NonNull String uriPattern)

Add a deep link to this destination.

From class NavGraphBuilder
final void

Add the destination to the NavGraphBuilder

final void
<D extends NavDestination> destination(
    @NonNull NavDestinationBuilder<@NonNull D> navDestination
)

Build and add a new destination to the NavGraphBuilder

final void

Adds this destination to the NavGraphBuilder

Public fields

id

@NonNull
public final int id

The destination's unique ID.

label

@Nullable
public final @Nullable CharSequence label

The descriptive label of the destination

moduleName

@Nullable
public final @Nullable String moduleName

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

@NonNull
public final int progressDestination

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

@Nullable
public final @Nullable String progressDestinationRoute

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.

route

@Nullable
public final @Nullable String route

The destination's unique route.

Public constructors

DynamicNavGraphBuilder

public final DynamicNavGraphBuilder(
    @NonNull NavigatorProvider provider,
    @IdRes int id,
    @IdRes int startDestination
)

DynamicNavGraphBuilder

public final DynamicNavGraphBuilder(
    @NonNull NavigatorProvider provider,
    @NonNull String startDestination,
    @Nullable String route
)

Public methods

Extension functions

DynamicActivityNavigatorDestinationBuilderKt.activity

@NonNull
public final void DynamicActivityNavigatorDestinationBuilderKt.activity(
    @NonNull DynamicNavGraphBuilder receiver,
    @IdRes int id,
    @NonNull Function1<@NonNull DynamicActivityNavigatorDestinationBuilderUnit> builder
)

Construct a new DynamicActivityNavigator.Destination

Parameters
@IdRes int id

Destination id.

DynamicActivityNavigatorDestinationBuilderKt.activity

@NonNull
public final void DynamicActivityNavigatorDestinationBuilderKt.activity(
    @NonNull DynamicNavGraphBuilder receiver,
    @NonNull String route,
    @NonNull Function1<@NonNull DynamicActivityNavigatorDestinationBuilderUnit> builder
)

Construct a new DynamicActivityNavigator.Destination

Parameters
@NonNull String route

Destination route.

DynamicFragmentNavigatorDestinationBuilderKt.fragment

@NonNull
public final void <F extends Fragment> DynamicFragmentNavigatorDestinationBuilderKt.fragment(
    @NonNull DynamicNavGraphBuilder receiver,
    @IdRes int id
)

Construct a new DynamicFragmentNavigator.Destination

Parameters
@IdRes int id

Destination id.

DynamicFragmentNavigatorDestinationBuilderKt.fragment

@NonNull
public final void <F extends Fragment> DynamicFragmentNavigatorDestinationBuilderKt.fragment(
    @NonNull DynamicNavGraphBuilder receiver,
    @IdRes int id,
    @NonNull Function1<@NonNull DynamicFragmentNavigatorDestinationBuilderUnit> builder
)

Construct a new DynamicFragmentNavigator.Destination

Parameters
@IdRes int id

Destination id.

DynamicFragmentNavigatorDestinationBuilderKt.fragment

@NonNull
public final void DynamicFragmentNavigatorDestinationBuilderKt.fragment(
    @Non