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;
|
package com.android.launcher3.anim;
|
||||||
|
|
||||||
import android.animation.Animator;
|
import android.animation.Animator;
|
||||||
|
import android.animation.AnimatorListenerAdapter;
|
||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.animation.ValueAnimator.AnimatorUpdateListener;
|
import android.animation.ValueAnimator.AnimatorUpdateListener;
|
||||||
import android.view.View;
|
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.
|
* 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 {
|
implements AnimatorUpdateListener {
|
||||||
public static final float ALPHA_CUTOFF_THRESHOLD = 0.01f;
|
public static final float ALPHA_CUTOFF_THRESHOLD = 0.01f;
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@ public class AlphaUpdateListener extends AnimationSuccessListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationSuccess(Animator animator) {
|
public void onAnimationEnd(Animator animator) {
|
||||||
updateVisibility(mView);
|
updateVisibility(mView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user