[navigator-animation] `popEnterTransition` drawn on top of `popExitTransition`
See original GitHub issueDescribe the bug
In navigator-animation
when I pop a NavBackStackEntry
off the graph and the popExitTransition
and popEnterTransition
is called the destinations popEnterTransition
is drawn over the current (popping) entry’s popExitTransition
.
To Reproduce
Construct an AnimatedNavHost
with a customized popEnterTransition
that has an initial offset > 0, e.g.
AnimatedNavHost(
navController,
startDestination = "Blue",
popEnterTransition = { _, _, ->
slideInHorizontally(initialOffsetX = { -it / 5 }, animationSpec = tween(durationMillis = 700))
}
)
NOTE:
If modifying the AnimatedNavHostSample
make sure to null
out the popEnterTransition
of the destination composable
, I updated the “Blue” composable
to popEnterTransition = null
Expected behavior
The popEnterTransition
for the destination NavBackStackEntry
should be drawn underneath (lower z-index) the popExitTransition
of the current NavBackStackEntry
during a pop.
Screenshots?
Environment:
- Android OS version: [Android 10]
- Device: [Emulator]
- Accompanist version: [
0.18.0
]
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:9
Top Results From Across the Web
Animate transitions between destinations - Android Developers
Entering a destination via a pop action, an action that pops additional destinations off of the back stack when navigating. Exiting a ...
Read more >How to set different transition animations on Navigator.pop() in ...
Every example I've found so far allows me to set only one possible transition when I pop my screen. Also, I use named...
Read more >Compose Navigation Animations (NEW) - YouTube
The BEST android courses in the world: https://codingwithmitch.com/In this video I show you how to add animations to your jetpack compose ...
Read more >Navigation Transitions in Jetpack Compose - YouTube
In this video, I show you how to add transition to your navigation in ComposeMy Compose Course is out now with 23+ hours...
Read more >Stack Navigator | React Navigation
Stack Navigator provides a way for your app to transition between screens where each new screen is placed on top of a stack....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same issue, which is especially jarring when screens slide up and down. I have a screen that should remain in place with another sliding up from the bottom then sliding down when exiting, but the main screen just appears directly so the slide down is lost.
@jbw0033
could this be as simple as specifying the targetContentZIndex when specifying the
transitionSpec
for theAnimatedContent
? :meaning instead of
we could do:
Also can this ticket please be reopened