NavHostKt
public final class NavHostKt
Summary
Public methods |
|
|---|---|
static final @NonNull NavGraph |
This method is deprecated. Use routes to create your NavGraph instead |
static final @NonNull NavGraph |
createGraph(Construct a new |
static final @NonNull NavGraph |
createGraph(Construct a new |
static final @NonNull NavGraph |
createGraph(Construct a new |
Public methods
createGraph
public static final @NonNull NavGraphcreateGraph(
@NonNull NavHost receiver,
@IdRes int id,
@IdRes int startDestination,
@NonNull Function1<@NonNull NavGraphBuilder, Unit> builder
)
Construct a new NavGraph
createGraph
public static final @NonNull NavGraph createGraph(
@NonNull NavHost receiver,
@NonNull String startDestination,
String route,
@NonNull Function1<@NonNull NavGraphBuilder, Unit> builder
)
Construct a new NavGraph
createGraph
public static final @NonNull NavGraph createGraph(
@NonNull NavHost receiver,
@NonNull Object startDestination,
KClass<@NonNull ?> route,
@NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap,
@NonNull Function1<@NonNull NavGraphBuilder, Unit> builder
)
Construct a new NavGraph
| Parameters | |
|---|---|
@NonNull Object startDestination |
the starting destination's route from an Object for this NavGraph. The respective NavDestination must be added as a |
KClass<@NonNull ?> route |
the graph's unique route from a |
@NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap |
A mapping of KType to custom NavType<*> in the |
@NonNull Function1<@NonNull NavGraphBuilder, Unit> builder |
the builder used to construct the graph |
createGraph
public static final @NonNull NavGraph createGraph(
@NonNull NavHost receiver,
@NonNull KClass<@NonNull ?> startDestination,
KClass<@NonNull ?> route,
@NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap,
@NonNull Function1<@NonNull NavGraphBuilder, Unit> builder
)
Construct a new NavGraph
| Parameters | |
|---|---|
@NonNull KClass<@NonNull ?> startDestination |
the starting destination's route from a |
KClass<@NonNull ?> route |
the graph's unique route from a |
@NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap |
A mapping of KType to custom NavType<*> in the |
@NonNull Function1<@NonNull NavGraphBuilder, Unit> builder |
the builder used to construct the graph |