Closed fornewid closed 3 years ago
Excited for this one.
Jetpack Navigation team is working for this. https://android-review.googlesource.com/c/platform/frameworks/support/+/1754655
Maybe a new library will be added to accompanist..? 👀 https://github.com/google/accompanist/pull/574
accompanist v0.16.0 now includes support for animations in navigation 🥳 🎉
We can use EnterTransition
and ExitTransition
with the new AnimatedNavHost
val navController = rememberAnimatedNavController()
AnimatedNavHost(
navController = navController,
startDestination = 'some-route',
enterTransition = { _, _ ->
materialSharedAxisX(forward = true, slideDistance = 30).enter.transition
},
exitTransition = { _, _ ->
materialSharedAxisX(forward = false, slideDistance = 30).exit.transition
}
) {
// Our composables can have individual transitions too
}
It is expected that transition animations can be applied to navigation-compose after some time. The following link is related to this.
Then, it seems that it needs to be changed to a form that can be combined with navigation-compose.