Merge "Add listener once for volume row animation"
This commit is contained in:
@@ -1889,14 +1889,14 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
|
|||||||
if (row.anim == null) {
|
if (row.anim == null) {
|
||||||
row.anim = ObjectAnimator.ofInt(row.slider, "progress", progress, newProgress);
|
row.anim = ObjectAnimator.ofInt(row.slider, "progress", progress, newProgress);
|
||||||
row.anim.setInterpolator(new DecelerateInterpolator());
|
row.anim.setInterpolator(new DecelerateInterpolator());
|
||||||
|
row.anim.addListener(
|
||||||
|
getJankListener(row.view, TYPE_UPDATE, UPDATE_ANIMATION_DURATION));
|
||||||
} else {
|
} else {
|
||||||
row.anim.cancel();
|
row.anim.cancel();
|
||||||
row.anim.setIntValues(progress, newProgress);
|
row.anim.setIntValues(progress, newProgress);
|
||||||
}
|
}
|
||||||
row.animTargetProgress = newProgress;
|
row.animTargetProgress = newProgress;
|
||||||
row.anim.setDuration(UPDATE_ANIMATION_DURATION);
|
row.anim.setDuration(UPDATE_ANIMATION_DURATION);
|
||||||
row.anim.addListener(
|
|
||||||
getJankListener(row.view, TYPE_UPDATE, UPDATE_ANIMATION_DURATION));
|
|
||||||
row.anim.start();
|
row.anim.start();
|
||||||
} else {
|
} else {
|
||||||
// update slider directly to clamped value
|
// update slider directly to clamped value
|
||||||
|
|||||||
Reference in New Issue
Block a user