Merge "[Bouncer] Move reset logic to end event." into tm-dev am: 277f9b3b76
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18585068 Change-Id: Ic610b9d7c0ff10179685f4501d4c81cd51327752 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -216,22 +216,16 @@ public class AppearAnimationUtils implements AppearAnimationCreator<View> {
|
||||
});
|
||||
}
|
||||
alphaAnim.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
// If Animation is canceled, we want to ensure UI is reset.
|
||||
view.setAlpha(targetAlpha);
|
||||
view.setTranslationY(targetTranslationY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
view.setAlpha(targetAlpha);
|
||||
if (endRunnable != null) {
|
||||
endRunnable.run();
|
||||
}
|
||||
}
|
||||
});
|
||||
alphaAnim.start();
|
||||
startTranslationYAnimation(view, delay, duration, appearing ? 0 : translationY,
|
||||
startTranslationYAnimation(view, delay, duration, targetTranslationY,
|
||||
interpolator, animatorListener);
|
||||
}
|
||||
}
|
||||
@@ -265,6 +259,12 @@ public class AppearAnimationUtils implements AppearAnimationCreator<View> {
|
||||
if (listener != null) {
|
||||
translationAnim.addListener(listener);
|
||||
}
|
||||
translationAnim.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
view.setTranslationY(endTranslationY);
|
||||
}
|
||||
});
|
||||
translationAnim.start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user