Skip to content

Commit c8bbb85

Browse files
committed
1 parent b9fdeb0 commit c8bbb85

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/com/android/launcher3/folder/Folder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ public void animateOpen() {
566566
float radius = (float) Math.hypot(rx, ry);
567567

568568
Animator reveal = new CircleRevealOutlineProvider((int) getPivotX(),
569-
(int) getPivotY(), 0, radius).createRevealAnimator(this);
569+
(int) getPivotY(), 0, radius).createRevealAnimator(this, false, true);
570570
reveal.setDuration(mMaterialExpandDuration);
571571
reveal.setInterpolator(new LogDecelerateInterpolator(100, 0));
572572

src/com/android/launcher3/util/RevealOutlineAnimation.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ public ValueAnimator createRevealAnimator(final View revealView) {
3333
}
3434

3535
public ValueAnimator createRevealAnimator(final View revealView, boolean isReversed) {
36+
return createRevealAnimator(revealView, isReversed, false);
37+
}
38+
39+
public ValueAnimator createRevealAnimator(final View revealView, boolean isReversed, final boolean restoreOutline) {
3640
ValueAnimator va =
3741
isReversed ? ValueAnimator.ofFloat(1f, 0f) : ValueAnimator.ofFloat(0f, 1f);
3842
final float elevation = revealView.getElevation();
@@ -55,8 +59,10 @@ public void onAnimationCancel(Animator animation) {
5559

5660
public void onAnimationEnd(Animator animation) {
5761
if (!mWasCanceled) {
58-
revealView.setOutlineProvider(ViewOutlineProvider.BACKGROUND);
59-
revealView.setClipToOutline(false);
62+
if (restoreOutline) {
63+
revealView.setOutlineProvider(ViewOutlineProvider.BACKGROUND);
64+
revealView.setClipToOutline(false);
65+
}
6066
if (shouldRemoveElevationDuringAnimation()) {
6167
revealView.setTranslationZ(0);
6268
}

0 commit comments

Comments
 (0)