-
public final class AnimatedNavHostKt
-
-
Method Summary
Modifier and Type Method Description final static UnitAnimatedNavHost(NavHostController navController, String startDestination, Modifier modifier, Alignment contentAlignment, String route, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, EnterTransition> enterTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, ExitTransition> exitTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, EnterTransition> popEnterTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, ExitTransition> popExitTransition, Function1<NavGraphBuilder, Unit> builder)Provides in place in the Compose hierarchy for self contained navigation to occur. final static UnitAnimatedNavHost(NavHostController navController, NavGraph graph, Modifier modifier, Alignment contentAlignment, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, EnterTransition> enterTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, ExitTransition> exitTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, EnterTransition> popEnterTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, ExitTransition> popExitTransition)Provides in place in the Compose hierarchy for self contained navigation to occur. -
-
Method Detail
-
AnimatedNavHost
@Deprecated(message = AnimatedNavHost has been migrated back into Androidx Navigation. Replace with navigation-compose NavHost with the same parameters. Change import from com.google.accompanist.navigation.animation.AnimatedNavHost to androidx.navigation.compose.NavHost.)@Composable() final static Unit AnimatedNavHost(NavHostController navController, String startDestination, Modifier modifier, Alignment contentAlignment, String route, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, EnterTransition> enterTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, ExitTransition> exitTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, EnterTransition> popEnterTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, ExitTransition> popExitTransition, Function1<NavGraphBuilder, Unit> builder)
Provides in place in the Compose hierarchy for self contained navigation to occur.
Once this is called, any Composable within the given NavGraphBuilder can be navigated to from the provided navController.
The builder passed into this method is remembered. This means that for this NavHost, the contents of the builder cannot be changed.
- Parameters:
navController- the navController for this hoststartDestination- the route for the start destinationmodifier- The modifier to be applied to the layout.route- the route for the graphenterTransition- callback to define enter transitions for destination in this hostexitTransition- callback to define exit transitions for destination in this hostpopEnterTransition- callback to define popEnter transitions for destination in this hostpopExitTransition- callback to define popExit transitions for destination in this hostbuilder- the builder used to construct the graph
-
AnimatedNavHost
@Deprecated(message = AnimatedNavHost has been migrated back into Androidx Navigation. Replace with navigation-compose NavHost with the same parameters. Change import from com.google.accompanist.navigation.animation.AnimatedNavHost to androidx.navigation.compose.NavHost.)@Composable() final static Unit AnimatedNavHost(NavHostController navController, NavGraph graph, Modifier modifier, Alignment contentAlignment, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, EnterTransition> enterTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, ExitTransition> exitTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, EnterTransition> popEnterTransition, Function1<AnimatedContentTransitionScope<NavBackStackEntry>, ExitTransition> popExitTransition)
Provides in place in the Compose hierarchy for self contained navigation to occur.
Once this is called, any Composable within the given NavGraphBuilder can be navigated to from the provided navController.
- Parameters:
navController- the navController for this hostgraph- the graph for this hostmodifier- The modifier to be applied to the layout.enterTransition- callback to define enter transitions for destination in this hostexitTransition- callback to define exit transitions for destination in this hostpopEnterTransition- callback to define popEnter transitions for destination in this hostpopExitTransition- callback to define popExit transitions for destination in this host
-
-
-
-