Hi <@UJBPFB3SN>, Any guide on how to provide Navi...
# compose
a
Hi @Ian Lake, Any guide on how to provide Navigation Animation with Accompanist for Nested Navigation? I tried doing:
Copy code
navigation(
   route = "routeName",
   startDestination = "startDestination"
) {
   // transitions defined in this composable never seem to run
   composable(
        route =  "someDestination",
        enterTransition = { slideIntoContainer(AnimatedContentScope.SlideDirection.End) },      
        exitTransition = { slideOutContainer(AnimatedContentScope.SlideDirection.Start) },      
        popEnterTransition = { slideIntoContainer(AnimatedContentScope.SlideDirection.End) },   
        popExitTransition = { slideOutContainer(AnimatedContentScope.SlideDirection.End) },
   ) {
      ...
   }
   ...
}
The only way I could make the animation to run is when I define the transition in the nested navigation:
Copy code
// Define them here instead and it works
navigation(
   route = "routeName",
   startDestination = "startDestination"
   enterTransition = { slideIntoContainer(AnimatedContentScope.SlideDirection.End) },      
        exitTransition = { slideOutContainer(AnimatedContentScope.SlideDirection.Start) },      
        popEnterTransition = { slideIntoContainer(AnimatedContentScope.SlideDirection.End) },   
        popExitTransition = { slideOutContainer(AnimatedContentScope.SlideDirection.End) },
) {
   composable(
        route = "someDestination",
   ) {
      ...
   }
   ...
}
Just wondering whether this is intended? or whether there is a better way to do this? Thanks in advance.
I found this as well: https://github.com/google/accompanist/issues/882 If I understand it correctly these are related?
i
Yep, just broken in this last release; we'll be prioritizing a fix when we're back from the Thanksgiving holiday here
K 3
🦜 4
a
Alright thank you very much