Search in sources :

Example 1 with LandscapeEdgeSwipeController

use of com.android.launcher3.uioverrides.touchcontrollers.LandscapeEdgeSwipeController in project android_packages_apps_Trebuchet by LineageOS.

the class QuickstepLauncher method createTouchControllers.

@Override
public TouchController[] createTouchControllers() {
    if (TestProtocol.sDebugTracing) {
        Log.d(TestProtocol.PAUSE_NOT_DETECTED, "createTouchControllers.1");
    }
    Mode mode = SysUINavigationMode.getMode(this);
    ArrayList<TouchController> list = new ArrayList<>();
    list.add(getDragController());
    if (mode == NO_BUTTON) {
        list.add(new NoButtonQuickSwitchTouchController(this));
        list.add(new NavBarToHomeTouchController(this));
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.PAUSE_NOT_DETECTED, "createTouchControllers.2");
        }
        if (FeatureFlags.ENABLE_OVERVIEW_ACTIONS.get()) {
            if (TestProtocol.sDebugTracing) {
                Log.d(TestProtocol.PAUSE_NOT_DETECTED, "createTouchControllers.3");
            }
            list.add(new NoButtonNavbarToOverviewTouchController(this));
        } else {
            list.add(new FlingAndHoldTouchController(this));
        }
    } else {
        if (getDeviceProfile().isVerticalBarLayout()) {
            list.add(new OverviewToAllAppsTouchController(this));
            list.add(new LandscapeEdgeSwipeController(this));
            if (mode.hasGestures) {
                list.add(new TransposedQuickSwitchTouchController(this));
            }
        } else {
            list.add(new PortraitStatesTouchController(this, mode.hasGestures));
            if (mode.hasGestures) {
                list.add(new QuickSwitchTouchController(this));
            }
        }
    }
    if (!getDeviceProfile().isMultiWindowMode) {
        list.add(new StatusBarTouchController(this));
    }
    list.add(new LauncherTaskViewController(this));
    return list.toArray(new TouchController[list.size()]);
}
Also used : NoButtonNavbarToOverviewTouchController(com.android.launcher3.uioverrides.touchcontrollers.NoButtonNavbarToOverviewTouchController) StatusBarTouchController(com.android.launcher3.uioverrides.touchcontrollers.StatusBarTouchController) OverviewToAllAppsTouchController(com.android.launcher3.uioverrides.touchcontrollers.OverviewToAllAppsTouchController) SysUINavigationMode(com.android.quickstep.SysUINavigationMode) Mode(com.android.quickstep.SysUINavigationMode.Mode) ArrayList(java.util.ArrayList) TransposedQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchTouchController) NavBarToHomeTouchController(com.android.launcher3.uioverrides.touchcontrollers.NavBarToHomeTouchController) OverviewToAllAppsTouchController(com.android.launcher3.uioverrides.touchcontrollers.OverviewToAllAppsTouchController) PortraitStatesTouchController(com.android.launcher3.uioverrides.touchcontrollers.PortraitStatesTouchController) NoButtonQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.NoButtonQuickSwitchTouchController) FlingAndHoldTouchController(com.android.launcher3.uioverrides.touchcontrollers.FlingAndHoldTouchController) TransposedQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchTouchController) StatusBarTouchController(com.android.launcher3.uioverrides.touchcontrollers.StatusBarTouchController) NoButtonNavbarToOverviewTouchController(com.android.launcher3.uioverrides.touchcontrollers.NoButtonNavbarToOverviewTouchController) TouchController(com.android.launcher3.util.TouchController) QuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.QuickSwitchTouchController) TaskViewTouchController(com.android.launcher3.uioverrides.touchcontrollers.TaskViewTouchController) PortraitStatesTouchController(com.android.launcher3.uioverrides.touchcontrollers.PortraitStatesTouchController) NoButtonQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.NoButtonQuickSwitchTouchController) FlingAndHoldTouchController(com.android.launcher3.uioverrides.touchcontrollers.FlingAndHoldTouchController) NoButtonQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.NoButtonQuickSwitchTouchController) TransposedQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchTouchController) QuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.QuickSwitchTouchController) NavBarToHomeTouchController(com.android.launcher3.uioverrides.touchcontrollers.NavBarToHomeTouchController) LandscapeEdgeSwipeController(com.android.launcher3.uioverrides.touchcontrollers.LandscapeEdgeSwipeController)

Example 2 with LandscapeEdgeSwipeController

use of com.android.launcher3.uioverrides.touchcontrollers.LandscapeEdgeSwipeController in project Neo-Launcher by NeoApplications.

the class RecentsUiFactory method createTouchControllers.

public static TouchController[] createTouchControllers(Launcher launcher) {
    Mode mode = SysUINavigationMode.getMode(launcher);
    ArrayList<TouchController> list = new ArrayList<>();
    list.add(launcher.getDragController());
    list.add(new PinchStateChangeTouchController(launcher));
    if (mode == NO_BUTTON) {
        list.add(new NoButtonQuickSwitchTouchController(launcher));
        list.add(new NavBarToHomeTouchController(launcher));
        list.add(new VerticalSwipeGestureController(launcher));
        list.add(new FlingAndHoldTouchController(launcher));
    } else {
        list.add(new VerticalSwipeGestureController(launcher));
        if (launcher.getDeviceProfile().isVerticalBarLayout()) {
            list.add(new OverviewToAllAppsTouchController(launcher));
            list.add(new LandscapeEdgeSwipeController(launcher));
            if (mode.hasGestures) {
                list.add(new TransposedQuickSwitchTouchController(launcher));
            }
        } else {
            list.add(new PortraitStatesTouchController(launcher, mode.hasGestures));
            if (mode.hasGestures) {
                list.add(new QuickSwitchTouchController(launcher));
            }
        }
    }
    if (FeatureFlags.PULL_DOWN_STATUS_BAR && !launcher.getDeviceProfile().isMultiWindowMode) {
        list.add(new StatusBarTouchController(launcher));
    }
    list.add(new LauncherTaskViewController(launcher));
    return list.toArray(new TouchController[list.size()]);
}
Also used : StatusBarTouchController(com.android.launcher3.uioverrides.touchcontrollers.StatusBarTouchController) PinchStateChangeTouchController(com.saggitt.omega.touch.PinchStateChangeTouchController) OverviewToAllAppsTouchController(com.android.launcher3.uioverrides.touchcontrollers.OverviewToAllAppsTouchController) RotationMode(com.android.launcher3.graphics.RotationMode) SysUINavigationMode(com.android.quickstep.SysUINavigationMode) Mode(com.android.quickstep.SysUINavigationMode.Mode) ArrayList(java.util.ArrayList) TransposedQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchTouchController) NavBarToHomeTouchController(com.android.launcher3.uioverrides.touchcontrollers.NavBarToHomeTouchController) PortraitStatesTouchController(com.android.launcher3.uioverrides.touchcontrollers.PortraitStatesTouchController) NoButtonQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.NoButtonQuickSwitchTouchController) FlingAndHoldTouchController(com.android.launcher3.uioverrides.touchcontrollers.FlingAndHoldTouchController) PinchStateChangeTouchController(com.saggitt.omega.touch.PinchStateChangeTouchController) TransposedQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchTouchController) StatusBarTouchController(com.android.launcher3.uioverrides.touchcontrollers.StatusBarTouchController) TouchController(com.android.launcher3.util.TouchController) OverviewToAllAppsTouchController(com.android.launcher3.uioverrides.touchcontrollers.OverviewToAllAppsTouchController) QuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.QuickSwitchTouchController) TaskViewTouchController(com.android.launcher3.uioverrides.touchcontrollers.TaskViewTouchController) PortraitStatesTouchController(com.android.launcher3.uioverrides.touchcontrollers.PortraitStatesTouchController) NoButtonQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.NoButtonQuickSwitchTouchController) FlingAndHoldTouchController(com.android.launcher3.uioverrides.touchcontrollers.FlingAndHoldTouchController) VerticalSwipeGestureController(com.saggitt.omega.gestures.VerticalSwipeGestureController) NoButtonQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.NoButtonQuickSwitchTouchController) TransposedQuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchTouchController) QuickSwitchTouchController(com.android.launcher3.uioverrides.touchcontrollers.QuickSwitchTouchController) NavBarToHomeTouchController(com.android.launcher3.uioverrides.touchcontrollers.NavBarToHomeTouchController) LandscapeEdgeSwipeController(com.android.launcher3.uioverrides.touchcontrollers.LandscapeEdgeSwipeController)

Aggregations

FlingAndHoldTouchController (com.android.launcher3.uioverrides.touchcontrollers.FlingAndHoldTouchController)2 LandscapeEdgeSwipeController (com.android.launcher3.uioverrides.touchcontrollers.LandscapeEdgeSwipeController)2 NavBarToHomeTouchController (com.android.launcher3.uioverrides.touchcontrollers.NavBarToHomeTouchController)2 NoButtonQuickSwitchTouchController (com.android.launcher3.uioverrides.touchcontrollers.NoButtonQuickSwitchTouchController)2 OverviewToAllAppsTouchController (com.android.launcher3.uioverrides.touchcontrollers.OverviewToAllAppsTouchController)2 PortraitStatesTouchController (com.android.launcher3.uioverrides.touchcontrollers.PortraitStatesTouchController)2 QuickSwitchTouchController (com.android.launcher3.uioverrides.touchcontrollers.QuickSwitchTouchController)2 StatusBarTouchController (com.android.launcher3.uioverrides.touchcontrollers.StatusBarTouchController)2 TaskViewTouchController (com.android.launcher3.uioverrides.touchcontrollers.TaskViewTouchController)2 TransposedQuickSwitchTouchController (com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchTouchController)2 TouchController (com.android.launcher3.util.TouchController)2 SysUINavigationMode (com.android.quickstep.SysUINavigationMode)2 Mode (com.android.quickstep.SysUINavigationMode.Mode)2 ArrayList (java.util.ArrayList)2 RotationMode (com.android.launcher3.graphics.RotationMode)1 NoButtonNavbarToOverviewTouchController (com.android.launcher3.uioverrides.touchcontrollers.NoButtonNavbarToOverviewTouchController)1 VerticalSwipeGestureController (com.saggitt.omega.gestures.VerticalSwipeGestureController)1 PinchStateChangeTouchController (com.saggitt.omega.touch.PinchStateChangeTouchController)1