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

Commit e2b9a2a0 authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Slightly scale down adjacent recent pages" into ub-launcher3-master

parents 9869f758 5eb4a1e9
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import android.widget.FrameLayout;
import android.widget.ImageView;

import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
import com.android.quickstep.views.RecentsView.PageCallbacks;
import com.android.quickstep.views.RecentsView.ScrollState;
@@ -55,6 +54,11 @@ public class TaskView extends FrameLayout implements TaskCallbacks, PageCallback
     */
    private static final float MAX_PAGE_SCRIM_ALPHA = 0.4f;

    /**
     * How much to scale down pages near the edge of the screen.
     */
    private static final float EDGE_SCALE_DOWN_FACTOR = 0.03f;

    private static final long SCALE_ICON_DURATION = 120;

    private Task mTask;
@@ -166,6 +170,10 @@ public class TaskView extends FrameLayout implements TaskCallbacks, PageCallback
                CURVE_INTERPOLATOR.getInterpolation(scrollState.linearInterpolation);

        mSnapshotView.setDimAlpha(1 - curveInterpolation * MAX_PAGE_SCRIM_ALPHA);

        float scale = 1 - curveInterpolation * EDGE_SCALE_DOWN_FACTOR;
        setScaleX(scale);
        setScaleY(scale);
    }

    private static final class TaskOutlineProvider extends ViewOutlineProvider {