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

Commit 404e6255 authored by Tony's avatar Tony
Browse files

Remove workspace card

Swiping up for recents scales down workspace and hides it, similar to the transition
to all apps. Simultaneously, recents slides in from the side.

Also removed the setting for swiping to the first task, as it is required now.

Change-Id: Id0845db6650a37917a4faa9c8a434a2270913904
parent 5cd8ab93
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -24,8 +24,4 @@
    android:alpha="0.0"
    android:visibility="invisible" >

    <com.android.launcher3.uioverrides.WorkspaceCard
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</com.android.quickstep.RecentsView>
 No newline at end of file
+3 −3
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
        boolean launchingCenterTask = launchedTaskIndex == centerTaskIndex;
        boolean isRtl = recentsView.isRtl();
        if (launchingCenterTask) {
            if (launchedTaskIndex - 1 >= recentsView.getFirstTaskIndex()) {
            if (launchedTaskIndex - 1 >= 0) {
                TaskView adjacentPage1 = (TaskView) recentsView.getPageAt(launchedTaskIndex - 1);
                ObjectAnimator adjacentTask1ScaleAndTranslate =
                        LauncherAnimUtils.ofPropertyValuesHolder(adjacentPage1,
@@ -317,7 +317,7 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
                                        .build());
                launcherAnimator.play(adjacentTask2ScaleAndTranslate);
            }
        } else if (centerTaskIndex >= recentsView.getFirstTaskIndex()) {
        } else {
            // We are launching an adjacent task, so parallax the center and other adjacent task.
            TaskView centerTask = (TaskView) recentsView.getPageAt(centerTaskIndex);
            float translationX = Math.abs(v.getTranslationX());
@@ -329,7 +329,7 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
                                    .build());
            launcherAnimator.play(centerTaskParallaxToRight);
            int otherAdjacentTaskIndex = centerTaskIndex + (centerTaskIndex - launchedTaskIndex);
            if (otherAdjacentTaskIndex >= recentsView.getFirstTaskIndex()
            if (otherAdjacentTaskIndex >= 0
                    && otherAdjacentTaskIndex < recentsView.getPageCount()) {
                TaskView otherAdjacentTask = (TaskView) recentsView.getPageAt(
                        otherAdjacentTaskIndex);
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ import com.android.launcher3.Launcher;
public class FastOverviewState extends OverviewState {

    private static final int STATE_FLAGS = FLAG_SHOW_SCRIM | FLAG_DISABLE_RESTORE
            | FLAG_PAGE_BACKGROUNDS | FLAG_DISABLE_INTERACTION | FLAG_OVERVIEW_UI;
            | FLAG_DISABLE_INTERACTION | FLAG_OVERVIEW_UI;

    private static final boolean DEBUG_DIFFERENT_UI = false;

+4 −5
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
package com.android.launcher3.uioverrides;

import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS;
import static com.android.launcher3.anim.Interpolators.ACCEL_2;
import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE;

import android.graphics.Rect;
@@ -34,7 +34,7 @@ import com.android.quickstep.RecentsView;
public class OverviewState extends LauncherState {

    private static final int STATE_FLAGS = FLAG_SHOW_SCRIM | FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED
            | FLAG_DISABLE_RESTORE | FLAG_PAGE_BACKGROUNDS | FLAG_OVERVIEW_UI;
            | FLAG_DISABLE_RESTORE | FLAG_OVERVIEW_UI;

    public OverviewState(int id) {
        this(id, STATE_FLAGS);
@@ -79,11 +79,10 @@ public class OverviewState extends LauncherState {
    }

    public PageAlphaProvider getWorkspacePageAlphaProvider(Launcher launcher) {
        final int centerPage = launcher.getWorkspace().getNextPage();
        return new PageAlphaProvider(ACCEL_2) {
        return new PageAlphaProvider(DEACCEL_2) {
            @Override
            public float getPageAlpha(int pageIndex) {
                return  pageIndex != centerPage ? 0 : 1f;
                return 0;
            }
        };
    }
+22 −28
Original line number Diff line number Diff line
@@ -15,6 +15,13 @@
 */
package com.android.launcher3.uioverrides;

import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_5;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.anim.Interpolators.scrollInterpolatorForVelocity;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
@@ -32,20 +39,13 @@ import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.touch.SwipeDetector;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.util.TouchController;
import com.android.quickstep.RecentsView;
import com.android.quickstep.TaskView;

import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_5;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.anim.Interpolators.scrollInterpolatorForVelocity;

/**
 * Touch controller for swipe interaction in Overview state
 */
@@ -132,12 +132,7 @@ public class OverviewSwipeController extends AnimatorListenerAdapter
                mTaskBeingDragged = null;
                mSwipeDownEnabled = true;

                int currentPage = mRecentsView.getCurrentPage();
                if (currentPage == 0) {
                    // User is on home tile
                    directionsToDetectScroll = SwipeDetector.DIRECTION_BOTH;
                } else {
                    View view = mRecentsView.getChildAt(currentPage);
                View view = mRecentsView.getChildAt(mRecentsView.getCurrentPage());
                if (mLauncher.getDragLayer().isEventOverView(view, ev) &&
                        view instanceof TaskView) {
                    // The tile can be dragged down to open the task.
@@ -155,7 +150,6 @@ public class OverviewSwipeController extends AnimatorListenerAdapter
                    return false;
                }
            }
            }

            mDetector.setDetectableScrollConditions(
                    directionsToDetectScroll, ignoreSlopWhenSettling);
Loading