diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java index 93c9ea8e3a..46249e992b 100644 --- a/src/com/android/launcher3/folder/Folder.java +++ b/src/com/android/launcher3/folder/Folder.java @@ -566,7 +566,7 @@ public void animateOpen() { float radius = (float) Math.hypot(rx, ry); Animator reveal = new CircleRevealOutlineProvider((int) getPivotX(), - (int) getPivotY(), 0, radius).createRevealAnimator(this); + (int) getPivotY(), 0, radius).createRevealAnimator(this, false, true); reveal.setDuration(mMaterialExpandDuration); reveal.setInterpolator(new LogDecelerateInterpolator(100, 0)); diff --git a/src/com/android/launcher3/util/RevealOutlineAnimation.java b/src/com/android/launcher3/util/RevealOutlineAnimation.java index 4560477753..41bf609e96 100644 --- a/src/com/android/launcher3/util/RevealOutlineAnimation.java +++ b/src/com/android/launcher3/util/RevealOutlineAnimation.java @@ -33,6 +33,10 @@ public ValueAnimator createRevealAnimator(final View revealView) { } public ValueAnimator createRevealAnimator(final View revealView, boolean isReversed) { + return createRevealAnimator(revealView, isReversed, false); + } + + public ValueAnimator createRevealAnimator(final View revealView, boolean isReversed, final boolean restoreOutline) { ValueAnimator va = isReversed ? ValueAnimator.ofFloat(1f, 0f) : ValueAnimator.ofFloat(0f, 1f); final float elevation = revealView.getElevation(); @@ -55,8 +59,10 @@ public void onAnimationCancel(Animator animation) { public void onAnimationEnd(Animator animation) { if (!mWasCanceled) { - revealView.setOutlineProvider(ViewOutlineProvider.BACKGROUND); - revealView.setClipToOutline(false); + if (restoreOutline) { + revealView.setOutlineProvider(ViewOutlineProvider.BACKGROUND); + revealView.setClipToOutline(false); + } if (shouldRemoveElevationDuringAnimation()) { revealView.setTranslationZ(0); }