am 45bdf81a: am e1449dfc: am 32b9f4a6: Merge "Reapply animation duration scale each time it is started." into lmp-dev
* commit '45bdf81a48253c90797e99794323c8ece9806a50': Reapply animation duration scale each time it is started.
This commit is contained in:
@@ -508,10 +508,14 @@ public class ValueAnimator extends Animator {
|
|||||||
duration);
|
duration);
|
||||||
}
|
}
|
||||||
mUnscaledDuration = duration;
|
mUnscaledDuration = duration;
|
||||||
mDuration = (long)(duration * sDurationScale);
|
updateScaledDuration();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateScaledDuration() {
|
||||||
|
mDuration = (long)(mUnscaledDuration * sDurationScale);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the length of the animation. The default duration is 300 milliseconds.
|
* Gets the length of the animation. The default duration is 300 milliseconds.
|
||||||
*
|
*
|
||||||
@@ -947,6 +951,7 @@ public class ValueAnimator extends Animator {
|
|||||||
mStarted = true;
|
mStarted = true;
|
||||||
mStartedDelay = false;
|
mStartedDelay = false;
|
||||||
mPaused = false;
|
mPaused = false;
|
||||||
|
updateScaledDuration(); // in case the scale factor has changed since creation time
|
||||||
AnimationHandler animationHandler = getOrCreateAnimationHandler();
|
AnimationHandler animationHandler = getOrCreateAnimationHandler();
|
||||||
animationHandler.mPendingAnimations.add(this);
|
animationHandler.mPendingAnimations.add(this);
|
||||||
if (mStartDelay == 0) {
|
if (mStartDelay == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user