-
public final class AnimatedNavHostKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> UnitAnimatedNavHost(NavController<T> controller, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<AnimatedNavHostScope<T>, T, Unit> contentSelector)An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the controller's backstack. final static <T extends Any> UnitAnimatedNavHost(NavBackstack<T> backstack, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<AnimatedNavHostScope<T>, T, Unit> contentSelector)An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the backstack. final static <T extends Any> UnitAnimatedNavHost(NavHostState<T> state, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<AnimatedNavHostScope<T>, T, Unit> contentSelector)An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the backstack. final static <T extends Any, S extends Any> UnitScopingAnimatedNavHost(NavController<T> controller, NavScopeSpec<T, S> scopeSpec, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<ScopingAnimatedNavHostScope<T, S>, T, Unit> contentSelector)An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the controller's backstack. final static <T extends Any, S extends Any> UnitScopingAnimatedNavHost(NavBackstack<T> backstack, NavScopeSpec<T, S> scopeSpec, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<ScopingAnimatedNavHostScope<T, S>, T, Unit> contentSelector)An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the backstack. final static <T extends Any, S extends Any> UnitScopingAnimatedNavHost(ScopingNavHostState<T, S> state, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<ScopingAnimatedNavHostScope<T, S>, T, Unit> contentSelector)An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the backstack. -
-
Method Detail
-
AnimatedNavHost
@Composable() final static <T extends Any> Unit AnimatedNavHost(NavController<T> controller, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<AnimatedNavHostScope<T>, T, Unit> contentSelector)
An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the controller's backstack.
This composable uses animated transitions to switch between destinations. You may set a custom NavTransitionSpec to specify the desired transitions.
If you don't need animated transitions use NavHost instead.
- Parameters:
controller- the navigation controller that will provide its backstack to this AnimatedNavHost.modifier- the modifier to be applied to AnimatedNavHosttransitionSpec- specifies the desired transitions.transitionQueueing- the strategy of processing incoming transitions when transition animations run slower than being addedcontentAlignment- the alignment inside AnimatedNavHostemptyBackstackPlaceholder- an optional placeholder composable that will be displayed when the backstack is empty.contentSelector- provides a composable that corresponds to the current last destination in the backstack.
-
AnimatedNavHost
@Composable() final static <T extends Any> Unit AnimatedNavHost(NavBackstack<T> backstack, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<AnimatedNavHostScope<T>, T, Unit> contentSelector)
An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the backstack.
This composable uses animated transitions to switch between destinations. You may set a custom NavTransitionSpec to specify the desired transitions.
If you don't need animated transitions use NavHost instead.
- Parameters:
backstack- the backstack from a NavController that will be used to observe navigation changes.modifier- the modifier to be applied to AnimatedNavHosttransitionSpec- specifies the desired transitions.transitionQueueing- the strategy of processing incoming transitions when transition animations run slower than being addedcontentAlignment- the alignment inside AnimatedNavHostemptyBackstackPlaceholder- an optional placeholder composable that will be displayed when the backstack is empty.contentSelector- provides a composable that corresponds to the current last destination in the backstack.
-
AnimatedNavHost
@Composable() final static <T extends Any> Unit AnimatedNavHost(NavHostState<T> state, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<AnimatedNavHostScope<T>, T, Unit> contentSelector)
An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the backstack.
This composable uses animated transitions to switch between destinations. You may set a custom NavTransitionSpec to specify the desired transitions.
If you don't need animated transitions use NavHost instead.
- Parameters:
state- the holder of all internal AnimatedNavHost state.modifier- the modifier to be applied to AnimatedNavHosttransitionSpec- specifies the desired transitions.transitionQueueing- the strategy of processing incoming transitions when transition animations run slower than being addedcontentAlignment- the alignment inside AnimatedNavHostemptyBackstackPlaceholder- an optional placeholder composable that will be displayed when the backstack is empty.contentSelector- provides a composable that corresponds to the current last destination in the backstack.
-
ScopingAnimatedNavHost
@Composable() final static <T extends Any, S extends Any> Unit ScopingAnimatedNavHost(NavController<T> controller, NavScopeSpec<T, S> scopeSpec, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<ScopingAnimatedNavHostScope<T, S>, T, Unit> contentSelector)
An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the controller's backstack.
This composable uses animated transitions to switch between destinations. You may set a custom NavTransitionSpec to specify the desired transitions.
If you don't need animated transitions use NavHost instead.
Scoping: This version of AnimatedNavHost gives you the ability to define scopes. Read more about it in NavScopeSpec.
- Parameters:
controller- the navigation controller that will provide its backstack to this AnimatedNavHost.scopeSpec- specifies scopes for every destination.modifier- the modifier to be applied to AnimatedNavHosttransitionSpec- specifies the desired transitions.transitionQueueing- the strategy of processing incoming transitions when transition animations run slower than being addedcontentAlignment- the alignment inside AnimatedNavHostemptyBackstackPlaceholder- an optional placeholder composable that will be displayed when the backstack is empty.contentSelector- provides a composable that corresponds to the current last destination in the backstack.
-
ScopingAnimatedNavHost
@Composable() final static <T extends Any, S extends Any> Unit ScopingAnimatedNavHost(NavBackstack<T> backstack, NavScopeSpec<T, S> scopeSpec, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<ScopingAnimatedNavHostScope<T, S>, T, Unit> contentSelector)
An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the backstack.
This composable uses animated transitions to switch between destinations. You may set a custom NavTransitionSpec to specify the desired transitions.
If you don't need animated transitions use NavHost instead.
Scoping: This version of AnimatedNavHost gives you the ability to define scopes. Read more about it in NavScopeSpec.
- Parameters:
backstack- the backstack from a NavController that will be used to observe navigation changes.scopeSpec- specifies scopes for every destination.transitionSpec- specifies the desired transitions.transitionQueueing- the strategy of processing incoming transitions when transition animations run slower than being addedcontentAlignment- the alignment inside AnimatedNavHostemptyBackstackPlaceholder- an optional placeholder composable that will be displayed when the backstack is empty.contentSelector- provides a composable that corresponds to the current last destination in the backstack.
-
ScopingAnimatedNavHost
@Composable() final static <T extends Any, S extends Any> Unit ScopingAnimatedNavHost(ScopingNavHostState<T, S> state, Modifier modifier, NavTransitionSpec<T> transitionSpec, NavTransitionQueueing transitionQueueing, Alignment contentAlignment, Function1<AnimatedVisibilityScope, Unit> emptyBackstackPlaceholder, Function2<ScopingAnimatedNavHostScope<T, S>, T, Unit> contentSelector)
An animated navigation host that selects UI for every destination and provides saved state and Android architecture components (Lifecycle, ViewModelStore, SavedStateRegistry) through CompositionLocalProvider for every unique NavEntry in the backstack.
This composable uses animated transitions to switch between destinations. You may set a custom NavTransitionSpec to specify the desired transitions.
If you don't need animated transitions use NavHost instead.
Scoping: This version of AnimatedNavHost gives you the ability to define scopes. Read more about it in NavScopeSpec.
- Parameters:
state- the holder of all internal ScopingAnimatedNavHost state.modifier- the modifier to be applied to AnimatedNavHosttransitionSpec- specifies the desired transitions.transitionQueueing- the strategy of processing incoming transitions when transition animations run slower than being addedcontentAlignment- the alignment inside AnimatedNavHostemptyBackstackPlaceholder- an optional placeholder composable that will be displayed when the backstack is empty.contentSelector- provides a composable that corresponds to the current last destination in the backstack.
-
-
-
-