diff options
Diffstat (limited to 'quickstep')
5 files changed, 24 insertions, 8 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java b/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java index b0f8d99b1..d86ba6aa6 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java @@ -68,8 +68,10 @@ public class AllAppsState extends LauncherState { @Override public float[] getWorkspaceScaleAndTranslation(Launcher launcher) { - // TODO: interpolate - return LauncherState.OVERVIEW.getWorkspaceScaleAndTranslation(launcher); + float[] scaleAndTranslation = LauncherState.OVERVIEW.getWorkspaceScaleAndTranslation( + launcher); + scaleAndTranslation[0] = 1; + return scaleAndTranslation; } @Override diff --git a/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java b/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java index ac940eaf7..3a49294c5 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java @@ -55,7 +55,7 @@ public class OverviewState extends LauncherState { ? workspacePage.getWidth() : launcher.getDeviceProfile().availableWidthPx; recentsView.getTaskSize(sTempRect); float scale = (float) sTempRect.width() / workspacePageWidth; - float parallaxFactor = 0.4f; + float parallaxFactor = 0.5f; return new float[]{scale, 0, -getDefaultSwipeHeight(launcher) * parallaxFactor}; } diff --git a/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java index 1d9ad9146..54ecb289a 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java @@ -197,7 +197,8 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr } }; animator.setFloatValues(0, 1); - animator.setDuration(Math.max(expectedDuration, 300)).setInterpolator(LINEAR); + animator.setDuration(Math.min(expectedDuration, ATOMIC_DURATION)) + .setInterpolator(LINEAR); } } else { mFinishFastOnSecondTouch = false; diff --git a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java index 79e3c4261..e43b24a6a 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java @@ -15,6 +15,10 @@ */ package com.android.launcher3.uioverrides; +import static com.android.launcher3.LauncherState.FAST_OVERVIEW; +import static com.android.launcher3.LauncherState.OVERVIEW; +import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_FADE; +import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_SCALE; import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE_IN_OUT; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.quickstep.QuickScrubController.QUICK_SCRUB_START_INTERPOLATOR; @@ -72,16 +76,17 @@ public class RecentsViewStateController implements StateHandler { } PropertySetter setter = config.getPropertySetter(builder); float[] scaleTranslationYFactor = toState.getOverviewScaleAndTranslationYFactor(mLauncher); - setter.setFloat(mRecentsView, ADJACENT_SCALE, scaleTranslationYFactor[0], LINEAR); - Interpolator transYInterpolator = LINEAR; - if (toState == LauncherState.FAST_OVERVIEW) { + Interpolator scaleInterpolator = builder.getInterpolator(ANIM_OVERVIEW_SCALE, LINEAR); + setter.setFloat(mRecentsView, ADJACENT_SCALE, scaleTranslationYFactor[0], scaleInterpolator); + Interpolator transYInterpolator = scaleInterpolator; + if (mLauncher.getStateManager().getState() == OVERVIEW && toState == FAST_OVERVIEW) { transYInterpolator = Interpolators.clampToProgress(QUICK_SCRUB_START_INTERPOLATOR, 0, QUICK_SCRUB_TRANSLATION_Y_FACTOR); } setter.setFloat(mRecentsView, TRANSLATION_Y_FACTOR, scaleTranslationYFactor[1], transYInterpolator); setter.setFloat(mRecentsViewContainer, CONTENT_ALPHA, toState.overviewUi ? 1 : 0, - AGGRESSIVE_EASE_IN_OUT); + builder.getInterpolator(ANIM_OVERVIEW_FADE, AGGRESSIVE_EASE_IN_OUT)); if (!toState.overviewUi) { builder.addOnFinishRunnable(mRecentsView::resetTaskVisuals); diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java index e6030d126..3e80d2cb6 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java @@ -16,6 +16,7 @@ package com.android.launcher3.uioverrides; +import static android.view.View.VISIBLE; import static com.android.launcher3.AbstractFloatingView.TYPE_ALL; import static com.android.launcher3.AbstractFloatingView.TYPE_HIDE_BACK_BUTTON; import static com.android.launcher3.LauncherState.ALL_APPS; @@ -201,6 +202,13 @@ public class UiFactory { return true; } + public static void prepareToShowOverview(Launcher launcher) { + RecentsView overview = launcher.getOverviewPanel(); + if (overview.getVisibility() != VISIBLE || overview.getContentAlpha() == 0) { + overview.setAdjacentScale(1.33f); + } + } + private static class LauncherTaskViewController extends TaskViewTouchController<Launcher> { public LauncherTaskViewController(Launcher activity) { |