james02/06/2022, 1:24 AM
? my use case is that I have a dynamic screen which can be accessed by either tapping through the UI, and it can be nested many levels deep, and my animation for sliding in and out works great there, but this dynamic screen can also be accessed via the hamburger menu, and when it's accessed from there, I want to clear the backstack (which is the easy part) but I also want the transition to be different, because sliding in feels and looks totally wrong there is this possible? or will I need to create entirely different routes and
declarations and just use different routes to display the same screen but with alternate transition animations?
composable(transition = )
Ian Lake02/06/2022, 1:51 AM
boolean you set only when navigating from your drawer) if the information of where you are going to and whether it is a pop isn't enough information
and whether it is a pop or not isn't enough information though? I guess if you are on the screen deep in your hierarchy right before this also accessible via the drawer screen and instead of clicking on the button to go to that screen, the user clicks on the drawer icon?
, you could just check for the existence of that argument in your transition lambdas to know which to run
james02/06/2022, 2:30 AM
you could be 3 levels deep in the UX flow and click something which would take you to
.. and that animation should slide in and out and your backstack remains intact however, you could also decide to open the nav drawer and click the "Cat" menu item there which would navigate you to the same
route, but this time we want to clear the back stack and maybe do a quick crossfade transition, not a sliding one
from inside the transition lambda, so I can simply check a parameter added to the route