From 517360659d214efac54dd5ad07bc54f508e5788c Mon Sep 17 00:00:00 2001 From: cretin45 Date: Wed, 17 Feb 2016 12:48:40 -0800 Subject: Trebuchet: Don't do reveal animation from apps/widgets to overview Issued-id: OPO-423 Change-Id: I218605be2215d5f6f8a2b2b8b786e0fdddb00643 --- src/com/android/launcher3/LauncherStateTransitionAnimation.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/LauncherStateTransitionAnimation.java b/src/com/android/launcher3/LauncherStateTransitionAnimation.java index 4c97727c1..2bdee3790 100644 --- a/src/com/android/launcher3/LauncherStateTransitionAnimation.java +++ b/src/com/android/launcher3/LauncherStateTransitionAnimation.java @@ -502,6 +502,9 @@ public class LauncherStateTransitionAnimation { final AnimatorSet animation = LauncherAnimUtils.createAnimatorSet(); final Resources res = mLauncher.getResources(); final boolean material = Utilities.ATLEAST_LOLLIPOP; + final boolean doReveal = !((mLauncher.mState == Launcher.State.APPS || + mLauncher.mState == Launcher.State.WIDGETS) && + toWorkspaceState == Workspace.State.OVERVIEW); final int revealDuration = res.getInteger(R.integer.config_overlayRevealTime); final int itemsAlphaStagger = res.getInteger(R.integer.config_overlayItemsAlphaStagger); @@ -537,7 +540,7 @@ public class LauncherStateTransitionAnimation { // hideAppsCustomizeHelper is called in some cases when it is already hidden // don't perform all these no-op animations. In particularly, this was causing // the all-apps button to pop in and out. - if (fromView.getVisibility() == View.VISIBLE) { + if (doReveal && fromView.getVisibility() == View.VISIBLE) { int width = revealView.getMeasuredWidth(); int height = revealView.getMeasuredHeight(); float revealRadius = (float) Math.hypot(width / 2, height / 2); @@ -638,6 +641,8 @@ public class LauncherStateTransitionAnimation { dispatchOnLauncherTransitionPrepare(fromView, animated, true); dispatchOnLauncherTransitionPrepare(toView, animated, true); + } else { + fromView.setVisibility(View.GONE); } animation.addListener(new AnimatorListenerAdapter() { -- cgit v1.2.3