Status Update
Comments
il...@google.com <il...@google.com>
jb...@google.com <jb...@google.com> #2
Unfortunately, this is a side-effect of the
With the new state manager, if you dispatch a state change, animations are completed immediately since we need to prepare the Fragment to move to another state. In this case, the fragment is moving up in state in sync with the host (in this case the new intent), the host moves the Fragment to STARTED
which kicks of the animations, then the host immediately moves to RESUMED
which causes the FragmentManager
to dispatch a state change and cancels all of the currently running animations.
Although the result is not the greatest, this is actually working as intended since we do want to cancel animations when a state change is dispatched.
en...@gmail.com <en...@gmail.com> #3
Well, so it's not possible to animate fragment change from onNewIntent anymore or there are any suggestions how to achieve this with new fragment manager?
Description
Components used:
There's a problem with Fragment animations when using Global actions in Navigation Component. When I try to navigate to Global action from onNewIntent after I tap a notification, the Fragment I'm navigating from just disappears. When I use the same Global Action directly without notification, everything works as intended.
When using Fragment 1.2.5 there's no problem with animations in these cases.
I have a similar problem with my main project, but could not reproduce it in this small test project. In the same situation (when you tap notification and use NavController.navigation(direction) in onNewIntent there are no enter animations at all, only when you tap back key it correctly shows pop-animations