Status Update
Comments
ya...@google.com <ya...@google.com> #2
I don't know if this is something that can be changed, but I'll look into it.
jb...@google.com <jb...@google.com> #3
Hmm... it is supposed to work like this, but you are seeing a bug.
ya...@google.com <ya...@google.com> #4
It cou8ld be tricky to get this right because the onAnimationEnd()
and onTransitionEnd()
often modify the state. We must execute the Runnable only after the state has been changed to its final value.
I think it could be dangerous to make a change, but it is possible to run all the internal listeners first, then run all of the external ones with the Runnable executed between. Again, it wouldn't be safe because we can't guarantee that only the internal listeners change the system state.
ya...@google.com <ya...@google.com> #5
Passing to Jeremy to get his thoughts
jb...@google.com <jb...@google.com> #6
What we really need is a signal to say when all transitions are done and with it running early, we don't have that. For fragments this means that we could end up moving the fragment to RESUMED
before all the transitions are actually completed and execute some code that is normally fine when the system is settled, but dangerous when it is not.
If moving onTransitionEnd()
might be too dangerous are there other options? If you are in the animateToStart
case should you even get an onTransitionEnd()
. Maybe all external listeners get is an onTransitionCancel()
since you are reversing a transition you started in the middle of it. Is that a safer signal to send back?
I think it is okay to separate the signals as long as they are explicit, but we for sure need a way to know that the Transition system is completely done doing any work and our Views are back in the original state that we passed them in.
ap...@google.com <ap...@google.com> #7
Maybe you could notify at the end of your animateToStart
lambda?
Description
Component used: androidx.transition
Version used: 1.4.0
Devices/Android versions reproduced on: all
If you do transitions on two sibling ViewGroups, A and B. A starts a transition on its root view, then B starts a transition. Inside of A's onTransitionEnd call back, if you start another transition on ViewGroup A, it will pause the Animators on the transition of ViewGroup B, which means the transition on B never ends.
Since two transitions with different sceneRoots should not interfere with one another, the expectation is that the transition on ViewGroup B does not get paused when by anything happening in ViewGroup A.
Not sure if this helps, but when starting another transition on ViewGroup A, the here which returns the animator associated with ViewGroup B.
pause()
inTransition
makes a call togetRunningAnimators()
In the attached sample you can see that the transition run on the
container
view group never ends.