Integration with navigation-compose
fornewid opened this issue · 4 comments
fornewid commented
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.
itsandreramon commented
Excited for this one.
fornewid commented
Jetpack Navigation team is working for this.
https://android-review.googlesource.com/c/platform/frameworks/support/+/1754655
fornewid commented
Maybe a new library will be added to accompanist..? 👀
google/accompanist#574
pblinux commented
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
}