OSDN Git Service

Starting new transition cancels running transition
authorChet Haase <chet@google.com>
Tue, 4 Jun 2013 15:46:42 +0000 (08:46 -0700)
committerChet Haase <chet@google.com>
Tue, 4 Jun 2013 15:46:42 +0000 (08:46 -0700)
commite9d32ea13ee14fc0eb4e45ca627ca77729d38bfe
tree671b10a4b7d2d722652d13b71267695a31c145f8
parent90b8994470f233f8bd187e441702d74f5d04644b
Starting new transition cancels running transition

The behavior of running a transition is janky and unpredictable,
when there is already a transition running on the same scene root.
Usually, the new transition simply jumps to the end values, or
jumps to the start values for that transition and animates from
there.

A better approach is to cancel any running transition first, the
start the new transition from that point.

Even better would be to blend old/new transitions, or at least adjust
the animation timing according to where/when the previous transition
stopped. In the meantime, this fix is at least better than the
previous approach of ignoring running transitions.

Change-Id: I4f5fabb55f6454f1e9d66589a9a7c36f9fc013fb
core/java/android/view/transition/Transition.java
core/java/android/view/transition/TransitionGroup.java
core/java/android/view/transition/TransitionManager.java