Reversing immediately after starting animator ends it
Previously, an animator that had started but not yet played its first frame would be reversed from its end state, which was not the desired behavior. Now, we detect that condition (started, but not yet actually running) and simply end() the animator immediately. Issue #10136266 ValueAnimator.reverse right after calling start() does the full animation Change-Id: I2a48d267336241ce74079c75758026c6f07ebc3a
This commit is contained in:
@@ -1027,6 +1027,8 @@ public class ValueAnimator extends Animator {
|
||||
long currentPlayTime = currentTime - mStartTime;
|
||||
long timeLeft = mDuration - currentPlayTime;
|
||||
mStartTime = currentTime - timeLeft;
|
||||
} else if (mStarted) {
|
||||
end();
|
||||
} else {
|
||||
start(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user