mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Have AlphaUpdateListener update visibility in onAnimationEnd()
Previously we were only updating visibility in onAnimationSuccess(), which doesn't handle the canceled case. Test: swipe up from nav bar twice in all apps, ensure all apps is invisible/non-interactable Bug: 190315266 Change-Id: Ic59e6d4b404de4ee2d17c45d6fa59e2aee70c65f
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.launcher3.anim;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.animation.ValueAnimator.AnimatorUpdateListener;
|
||||
import android.view.View;
|
||||
@@ -25,7 +26,7 @@ import android.view.ViewGroup;
|
||||
/**
|
||||
* A convenience class to update a view's visibility state after an alpha animation.
|
||||
*/
|
||||
public class AlphaUpdateListener extends AnimationSuccessListener
|
||||
public class AlphaUpdateListener extends AnimatorListenerAdapter
|
||||
implements AnimatorUpdateListener {
|
||||
public static final float ALPHA_CUTOFF_THRESHOLD = 0.01f;
|
||||
|
||||
@@ -41,7 +42,7 @@ public class AlphaUpdateListener extends AnimationSuccessListener
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationSuccess(Animator animator) {
|
||||
public void onAnimationEnd(Animator animator) {
|
||||
updateVisibility(mView);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user