diff options
Diffstat (limited to 'quickstep/src/com/android/launcher3/uioverrides')
3 files changed, 16 insertions, 5 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/FastOverviewState.java b/quickstep/src/com/android/launcher3/uioverrides/FastOverviewState.java index a11625a34..da85990bb 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/FastOverviewState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/FastOverviewState.java @@ -15,6 +15,7 @@ */ package com.android.launcher3.uioverrides; +import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; import com.android.quickstep.QuickScrubController; import com.android.quickstep.views.RecentsView; @@ -45,6 +46,15 @@ public class FastOverviewState extends OverviewState { @Override public float[] getOverviewScaleAndTranslationYFactor(Launcher launcher) { - return new float[] {1f, 0.5f}; + return new float[] {getOverviewScale(launcher.getDeviceProfile()), 0.5f}; + } + + public static float getOverviewScale(DeviceProfile dp) { + if (dp.isMultiWindowMode || dp.isVerticalBarLayout()) { + return 1f; + } + + // TODO: Calculate it dynamically based on available space + return 1.3f; } } diff --git a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java index e43b24a6a..e3aabd6c8 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java @@ -15,6 +15,7 @@ */ package com.android.launcher3.uioverrides; +import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY; 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; @@ -24,7 +25,6 @@ import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.quickstep.QuickScrubController.QUICK_SCRUB_START_INTERPOLATOR; import static com.android.quickstep.QuickScrubController.QUICK_SCRUB_TRANSLATION_Y_FACTOR; import static com.android.quickstep.views.LauncherRecentsView.TRANSLATION_Y_FACTOR; -import static com.android.quickstep.views.RecentsView.ADJACENT_SCALE; import static com.android.quickstep.views.RecentsViewContainer.CONTENT_ALPHA; import android.animation.ValueAnimator; @@ -59,7 +59,7 @@ public class RecentsViewStateController implements StateHandler { public void setState(LauncherState state) { mRecentsViewContainer.setContentAlpha(state.overviewUi ? 1 : 0); float[] scaleTranslationYFactor = state.getOverviewScaleAndTranslationYFactor(mLauncher); - mRecentsView.setAdjacentScale(scaleTranslationYFactor[0]); + SCALE_PROPERTY.set(mRecentsView, scaleTranslationYFactor[0]); mRecentsView.setTranslationYFactor(scaleTranslationYFactor[1]); if (state.overviewUi) { mRecentsView.updateEmptyMessage(); @@ -77,7 +77,7 @@ public class RecentsViewStateController implements StateHandler { PropertySetter setter = config.getPropertySetter(builder); float[] scaleTranslationYFactor = toState.getOverviewScaleAndTranslationYFactor(mLauncher); Interpolator scaleInterpolator = builder.getInterpolator(ANIM_OVERVIEW_SCALE, LINEAR); - setter.setFloat(mRecentsView, ADJACENT_SCALE, scaleTranslationYFactor[0], scaleInterpolator); + setter.setFloat(mRecentsView, SCALE_PROPERTY, scaleTranslationYFactor[0], scaleInterpolator); Interpolator transYInterpolator = scaleInterpolator; if (mLauncher.getStateManager().getState() == OVERVIEW && toState == FAST_OVERVIEW) { transYInterpolator = Interpolators.clampToProgress(QUICK_SCRUB_START_INTERPOLATOR, 0, diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java index 76820b6aa..d0c7b2117 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java @@ -19,6 +19,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.LauncherAnimUtils.SCALE_PROPERTY; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; @@ -207,7 +208,7 @@ public class UiFactory { public static void prepareToShowOverview(Launcher launcher) { RecentsView overview = launcher.getOverviewPanel(); if (overview.getVisibility() != VISIBLE || overview.getContentAlpha() == 0) { - overview.setAdjacentScale(1.33f); + SCALE_PROPERTY.set(overview, 1.33f); } } |