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

Commit e3f7d0d1 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Add split placeholder view above OverviewScrim

Only show single split option for landscape and
seascape overview menu options.

Bug: 181705607
Change-Id: I577fbaed41b5debd007c953851ec2056988057d9
parent 11d7d34f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -19,8 +19,7 @@
        android:id="@+id/split_placeholder"
        android:layout_width="match_parent"
        android:layout_height="@dimen/split_placeholder_size"
        android:background="@android:color/white"
        android:alpha=".8"
        android:background="@android:color/darker_gray"
        android:visibility="gone" />

    <com.android.quickstep.views.LauncherRecentsView
+8 −3
Original line number Diff line number Diff line
@@ -92,6 +92,7 @@ public abstract class BaseQuickstepLauncher extends Launcher
    private final TaskbarStateHandler mTaskbarStateHandler = new TaskbarStateHandler(this);
    // Will be updated when dragging from taskbar.
    private @Nullable DragOptions mNextWorkspaceDragOptions = null;
    private SplitPlaceholderView mSplitPlaceholderView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
@@ -215,12 +216,12 @@ public abstract class BaseQuickstepLauncher extends Launcher

        SysUINavigationMode.INSTANCE.get(this).updateMode();
        mActionsView = findViewById(R.id.overview_actions_view);
        SplitPlaceholderView splitPlaceholderView = findViewById(R.id.split_placeholder);
        mSplitPlaceholderView = findViewById(R.id.split_placeholder);
        RecentsView overviewPanel = (RecentsView) getOverviewPanel();
        splitPlaceholderView.init(
        mSplitPlaceholderView.init(
                new SplitSelectStateController(SystemUiProxy.INSTANCE.get(this))
        );
        overviewPanel.init(mActionsView, splitPlaceholderView);
        overviewPanel.init(mActionsView, mSplitPlaceholderView);
        mActionsView.updateVerticalMargin(SysUINavigationMode.getMode(this));

        mAppTransitionManager = new QuickstepTransitionManager(this);
@@ -256,6 +257,10 @@ public abstract class BaseQuickstepLauncher extends Launcher
        return (T) mActionsView;
    }

    public SplitPlaceholderView getSplitPlaceholderView() {
        return mSplitPlaceholderView;
    }

    @Override
    protected void closeOpenViews(boolean animate) {
        super.closeOpenViews(animate);
+5 −0
Original line number Diff line number Diff line
@@ -116,6 +116,11 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
                config.getInterpolator(ANIM_OVERVIEW_SCRIM_FADE, LINEAR));
        setter.setFloat(scrim, SCRIM_MULTIPLIER, 1f,
                config.getInterpolator(ANIM_OVERVIEW_SCRIM_FADE, LINEAR));
        if (toState.areElementsVisible(mLauncher, LauncherState.SPLIT_PLACHOLDER_VIEW)) {
            scrim.updateStableScrimmedView(mLauncher.getSplitPlaceholderView());
        } else {
            scrim.updateStableScrimmedView(mLauncher.getOverviewPanel());
        }

        setter.setFloat(
                mRecentsView, getTaskModalnessProperty(),
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ public final class RecentsViewStateController extends
                        ANIM_OVERVIEW_ACTIONS_FADE, LINEAR));

        float splitPlaceholderAlpha = state.areElementsVisible(mLauncher, SPLIT_PLACHOLDER_VIEW) ?
                1 : 0;
                0.7f : 0;
        propertySetter.setFloat(mRecentsView.getSplitPlaceholder(), ALPHA_FLOAT,
                splitPlaceholderAlpha, LINEAR);
    }
+7 −0
Original line number Diff line number Diff line
@@ -66,6 +66,13 @@ public class OverviewScrim extends Scrim {
        mStableScrimmedView = mCurrentScrimmedView = mLauncher.getOverviewPanel();
    }

    /**
     * @param view The view we want the scrim to be behind
     */
    public void updateStableScrimmedView(View view) {
        mStableScrimmedView = view;
    }

    public void updateCurrentScrimmedView(ViewGroup root) {
        // Find the lowest view that is at or above the view we want to show the scrim behind.
        mCurrentScrimmedView = mStableScrimmedView;
Loading