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

Commit 6782b595 authored by yyalan's avatar yyalan
Browse files

[Quickswitch] animations and gesture recognizer

Recognize Quickswitch gesture i.e. 4F left.

We only accept left swip for now (discussion in bug)

Bug: 382501511
Flag: com.android.systemui.shared.new_touchpad_gestures_tutorial
Test: In following CLs
Change-Id: Ia070d367bfc808a71d849e2afd9451f62883f253
parent 6fdb9d03
Loading
Loading
Loading
Loading
+1 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -3997,13 +3997,13 @@
    <!-- Touchpad switch apps gesture action name in tutorial [CHAR LIMIT=NONE] -->
    <string name="touchpad_switch_apps_gesture_action_title">Switch apps</string>
    <!-- Touchpad switch apps gesture guidance in gestures tutorial [CHAR LIMIT=NONE] -->
    <string name="touchpad_switch_apps_gesture_guidance">Swipe left or right using four fingers on your touchpad</string>
    <string name="touchpad_switch_apps_gesture_guidance">Swipe left using four fingers on your touchpad</string>
    <!-- Screen title after switch apps gesture was done successfully [CHAR LIMIT=NONE] -->
    <string name="touchpad_switch_apps_gesture_success_title">Great job!</string>
    <!-- Text shown to the user after they complete switch apps gesture tutorial [CHAR LIMIT=NONE] -->
    <string name="touchpad_switch_apps_gesture_success_body">You completed the switch apps gesture.</string>
    <!-- Text shown to the user after switch gesture was not done correctly [CHAR LIMIT=NONE] -->
    <string name="touchpad_switch_gesture_error_body">Swipe left or right using four fingers on your touchpad to switch apps</string>
    <string name="touchpad_switch_gesture_error_body">Swipe left using four fingers on your touchpad to switch apps</string>

    <!-- KEYBOARD TUTORIAL-->
    <!-- Action key tutorial title [CHAR LIMIT=NONE] -->
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ fun ActionTutorialContent(
        val buttonAlpha by animateFloatAsState(if (actionState is Finished) 1f else 0f)
        DoneButton(
            onDoneButtonClicked = onDoneButtonClicked,
            modifier = Modifier.graphicsLayer { alpha = buttonAlpha },
            modifier = Modifier.padding(horizontal = 60.dp).graphicsLayer { alpha = buttonAlpha },
            enabled = actionState is Finished,
        )
    }
+2 −2
Original line number Diff line number Diff line
@@ -46,8 +46,8 @@ fun SwitchAppsGestureTutorialScreen(
                    titleErrorResId = R.string.gesture_error_title,
                    bodyErrorResId = R.string.touchpad_switch_gesture_error_body,
                ),
            // TODO: replace animation
            animations = TutorialScreenConfig.Animations(educationResId = R.raw.trackpad_back_edu),
            animations =
                TutorialScreenConfig.Animations(educationResId = R.raw.trackpad_switch_apps_edu),
        )
    GestureTutorialScreen(
        screenConfig = screenConfig,
Loading