Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 839d0d71 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "all-apps-arrow" into ub-launcher3-master

* changes:
  Add all apps education bounce animation
  Update vertical drag handle (all apps arrow)
parents 1de8b5cf 490a8ab7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
@@ -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);

+0 −3
Original line number Diff line number Diff line
@@ -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>
+1 −4
Original line number Diff line number Diff line
@@ -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;
@@ -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);
+11 −9
Original line number Diff line number Diff line
@@ -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;
@@ -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;
    }
@@ -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();
@@ -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 {
@@ -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
@@ -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;
    }
}
+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