From caf46486f54cdc899e383dfc776ec33a81b089a1 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Fri, 15 Mar 2013 13:04:42 -0700 Subject: [PATCH] Reset reverse state when an animator ends Seeking an animation after the animator has reverse()'d to the beginning will result in seeking in reverse. Starting the animation will make it proceed normally, and calling reverse() will also give expected behavior. But seeking causes this unexpected behavior because the state of reversing is not reset until the next time the animation is played (either by start() or reverse()). Fix is to reset the internal flag when the animator ends. Issue #8234676 Reversing an Animator Leaves it in A Reversed State Until Explicitly Started Change-Id: I9d212ae1879aa277d1add7eb4c7ec61432af059e --- core/java/android/animation/ValueAnimator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java index f7460c44034f0..4a58072ae9fb9 100644 --- a/core/java/android/animation/ValueAnimator.java +++ b/core/java/android/animation/ValueAnimator.java @@ -1015,6 +1015,7 @@ public class ValueAnimator extends Animator { mRunning = false; mStarted = false; mStartListenersCalled = false; + mPlayingBackwards = false; } /**