Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java +1 −2 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.Hotseat; import com.android.launcher3.LauncherState; import com.android.launcher3.LauncherStateManager.StateListener; import com.android.launcher3.R; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.appprediction.PredictionUiStateManager; import com.android.launcher3.appprediction.PredictionUiStateManager.Client; Loading Loading @@ -172,7 +171,7 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher> mActivity.getAllAppsController(), ALL_APPS_PROGRESS, allAppsProgressOffscreen)); ObjectAnimator dragHandleAnim = ObjectAnimator.ofInt( mActivity.findViewById(R.id.scrim_view), ScrimView.DRAG_HANDLE_ALPHA, 0); mActivity.getScrimView(), ScrimView.DRAG_HANDLE_ALPHA, 0); dragHandleAnim.setInterpolator(Interpolators.ACCEL_2); anim.play(dragHandleAnim); Loading quickstep/res/values/dimens.xml +0 −3 Original line number Diff line number Diff line Loading @@ -66,9 +66,6 @@ docked_stack_divider_thickness - 2 * docked_stack_divider_insets --> <dimen name="multi_window_task_divider_size">10dp</dimen> <!-- same as vertical_drag_handle_size --> <dimen name="shelf_surface_offset">24dp</dimen> <!-- Assistant Gestures --> <!-- Distance from the vertical edges of the screen in which assist gestures are recognized --> <dimen name="gestures_assistant_width">48dp</dimen> Loading quickstep/src/com/android/quickstep/util/LayoutUtils.java +1 −4 Original line number Diff line number Diff line Loading @@ -33,9 +33,6 @@ import com.android.quickstep.SysUINavigationMode; import java.lang.annotation.Retention; import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS; import static java.lang.annotation.RetentionPolicy.SOURCE; public class LayoutUtils { private static final int MULTI_WINDOW_STRATEGY_HALF_SCREEN = 1; Loading Loading @@ -68,7 +65,7 @@ public class LayoutUtils { // UI when shown. extraSpace = 0; } else { extraSpace = getDefaultSwipeHeight(context, dp) + dp.verticalDragHandleSizePx extraSpace = getDefaultSwipeHeight(context, dp) + dp.workspacePageIndicatorHeight + res.getDimensionPixelSize( R.dimen.dynamic_grid_hotseat_extra_vertical_size) + res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_bottom_padding); Loading quickstep/src/com/android/quickstep/views/ShelfScrimView.java +11 −9 Original line number Diff line number Diff line Loading @@ -88,7 +88,6 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> private float mShiftRange; private final float mShelfOffset; private float mTopOffset; private float mShelfTop; private float mShelfTopAtThreshold; Loading @@ -110,7 +109,6 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> mRadius = BOTTOM_CORNER_RADIUS_RATIO * Themes.getDialogCornerRadius(context); mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mShelfOffset = context.getResources().getDimension(R.dimen.shelf_surface_offset); // Just assume the easiest UI for now, until we have the proper layout information. mDrawingFlatColor = true; } Loading Loading @@ -179,7 +177,7 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> Math.min(hotseatSize, LayoutUtils.getDefaultSwipeHeight(context, dp)); mDragHandleProgress = 1 - (dragHandleTop / mShiftRange); } mTopOffset = dp.getInsets().top - mShelfOffset; mTopOffset = dp.getInsets().top - mDragHandleSize.y; mShelfTopAtThreshold = mShiftRange * SCRIM_CATCHUP_THRESHOLD + mTopOffset; } updateColors(); Loading @@ -190,12 +188,15 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> @Override public void updateColors() { super.updateColors(); if (mDrawingFlatColor) { mDragHandleOffset = 0; if (mDrawingFlatColor) { return; } mDragHandleOffset = mShelfOffset - mDragHandleSize; if (mProgress < mDragHandleProgress) { mDragHandleOffset = mShiftRange * (mDragHandleProgress - mProgress); } if (mProgress >= SCRIM_CATCHUP_THRESHOLD) { mShelfTop = mShiftRange * mProgress + mTopOffset; } else { Loading Loading @@ -231,10 +232,6 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> (float) 0, LINEAR)); mRemainingScreenColor = setColorAlphaBound(mScrimColor, remainingScrimAlpha); } if (mProgress < mDragHandleProgress) { mDragHandleOffset += mShiftRange * (mDragHandleProgress - mProgress); } } @Override Loading Loading @@ -290,4 +287,9 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> mPaint.setColor(mShelfColor); canvas.drawRoundRect(0, mShelfTop, width, height + mRadius, mRadius, mRadius, mPaint); } @Override public float getVisualTop() { return mShelfTop; } } res/drawable-v24/drag_handle_indicator_shadow.xml 0 → 100644 +19 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2020 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <com.android.launcher3.graphics.ShadowDrawable xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/drag_handle_indicator_no_shadow" android:elevation="@dimen/vertical_drag_handle_elevation" /> Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java +1 −2 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.Hotseat; import com.android.launcher3.LauncherState; import com.android.launcher3.LauncherStateManager.StateListener; import com.android.launcher3.R; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.appprediction.PredictionUiStateManager; import com.android.launcher3.appprediction.PredictionUiStateManager.Client; Loading Loading @@ -172,7 +171,7 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher> mActivity.getAllAppsController(), ALL_APPS_PROGRESS, allAppsProgressOffscreen)); ObjectAnimator dragHandleAnim = ObjectAnimator.ofInt( mActivity.findViewById(R.id.scrim_view), ScrimView.DRAG_HANDLE_ALPHA, 0); mActivity.getScrimView(), ScrimView.DRAG_HANDLE_ALPHA, 0); dragHandleAnim.setInterpolator(Interpolators.ACCEL_2); anim.play(dragHandleAnim); Loading
quickstep/res/values/dimens.xml +0 −3 Original line number Diff line number Diff line Loading @@ -66,9 +66,6 @@ docked_stack_divider_thickness - 2 * docked_stack_divider_insets --> <dimen name="multi_window_task_divider_size">10dp</dimen> <!-- same as vertical_drag_handle_size --> <dimen name="shelf_surface_offset">24dp</dimen> <!-- Assistant Gestures --> <!-- Distance from the vertical edges of the screen in which assist gestures are recognized --> <dimen name="gestures_assistant_width">48dp</dimen> Loading
quickstep/src/com/android/quickstep/util/LayoutUtils.java +1 −4 Original line number Diff line number Diff line Loading @@ -33,9 +33,6 @@ import com.android.quickstep.SysUINavigationMode; import java.lang.annotation.Retention; import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS; import static java.lang.annotation.RetentionPolicy.SOURCE; public class LayoutUtils { private static final int MULTI_WINDOW_STRATEGY_HALF_SCREEN = 1; Loading Loading @@ -68,7 +65,7 @@ public class LayoutUtils { // UI when shown. extraSpace = 0; } else { extraSpace = getDefaultSwipeHeight(context, dp) + dp.verticalDragHandleSizePx extraSpace = getDefaultSwipeHeight(context, dp) + dp.workspacePageIndicatorHeight + res.getDimensionPixelSize( R.dimen.dynamic_grid_hotseat_extra_vertical_size) + res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_bottom_padding); Loading
quickstep/src/com/android/quickstep/views/ShelfScrimView.java +11 −9 Original line number Diff line number Diff line Loading @@ -88,7 +88,6 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> private float mShiftRange; private final float mShelfOffset; private float mTopOffset; private float mShelfTop; private float mShelfTopAtThreshold; Loading @@ -110,7 +109,6 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> mRadius = BOTTOM_CORNER_RADIUS_RATIO * Themes.getDialogCornerRadius(context); mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mShelfOffset = context.getResources().getDimension(R.dimen.shelf_surface_offset); // Just assume the easiest UI for now, until we have the proper layout information. mDrawingFlatColor = true; } Loading Loading @@ -179,7 +177,7 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> Math.min(hotseatSize, LayoutUtils.getDefaultSwipeHeight(context, dp)); mDragHandleProgress = 1 - (dragHandleTop / mShiftRange); } mTopOffset = dp.getInsets().top - mShelfOffset; mTopOffset = dp.getInsets().top - mDragHandleSize.y; mShelfTopAtThreshold = mShiftRange * SCRIM_CATCHUP_THRESHOLD + mTopOffset; } updateColors(); Loading @@ -190,12 +188,15 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> @Override public void updateColors() { super.updateColors(); if (mDrawingFlatColor) { mDragHandleOffset = 0; if (mDrawingFlatColor) { return; } mDragHandleOffset = mShelfOffset - mDragHandleSize; if (mProgress < mDragHandleProgress) { mDragHandleOffset = mShiftRange * (mDragHandleProgress - mProgress); } if (mProgress >= SCRIM_CATCHUP_THRESHOLD) { mShelfTop = mShiftRange * mProgress + mTopOffset; } else { Loading Loading @@ -231,10 +232,6 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> (float) 0, LINEAR)); mRemainingScreenColor = setColorAlphaBound(mScrimColor, remainingScrimAlpha); } if (mProgress < mDragHandleProgress) { mDragHandleOffset += mShiftRange * (mDragHandleProgress - mProgress); } } @Override Loading Loading @@ -290,4 +287,9 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher> mPaint.setColor(mShelfColor); canvas.drawRoundRect(0, mShelfTop, width, height + mRadius, mRadius, mRadius, mPaint); } @Override public float getVisualTop() { return mShelfTop; } }
res/drawable-v24/drag_handle_indicator_shadow.xml 0 → 100644 +19 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2020 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <com.android.launcher3.graphics.ShadowDrawable xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/drag_handle_indicator_no_shadow" android:elevation="@dimen/vertical_drag_handle_elevation" />