mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Fixing animation jittering during swipe-up
AnimatorPlaybackController was using setCurrentPlayTime to control animation, which converts progress (float) to duration (long) causing the progress to loose accuracy. Instead calling setCurrentFraction(float) on the target animation. Bug: 155164803 Change-Id: I3e4c93c5a75a9ba16e80adee97229c974ffc86b1
This commit is contained in:
@@ -70,7 +70,7 @@ public class PendingAnimation implements PropertySetter {
|
||||
|
||||
public void add(Animator a, SpringProperty springProperty) {
|
||||
mAnim.play(a);
|
||||
addAnimationHoldersRecur(a, springProperty, mAnimHolders);
|
||||
addAnimationHoldersRecur(a, mDuration, springProperty, mAnimHolders);
|
||||
}
|
||||
|
||||
public void finish(boolean isSuccess, int logAction) {
|
||||
@@ -150,7 +150,7 @@ public class PendingAnimation implements PropertySetter {
|
||||
}
|
||||
if (mAnimHolders.isEmpty()) {
|
||||
// Add a dummy animation to that the duration is respected
|
||||
add(ValueAnimator.ofFloat(0, 1));
|
||||
add(ValueAnimator.ofFloat(0, 1).setDuration(mDuration));
|
||||
}
|
||||
return mAnim;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user