Loading packages/SystemUI/res/values/strings.xml +2 −0 Original line number Original line Diff line number Diff line Loading @@ -4010,6 +4010,8 @@ <string name="touchpad_tutorial_switch_apps_gesture_button">Switch apps</string> <string name="touchpad_tutorial_switch_apps_gesture_button">Switch apps</string> <!-- Label for button finishing touchpad tutorial [CHAR LIMIT=NONE] --> <!-- Label for button finishing touchpad tutorial [CHAR LIMIT=NONE] --> <string name="touchpad_tutorial_done_button">Done</string> <string name="touchpad_tutorial_done_button">Done</string> <!-- Label for button proceeding touchpad tutorial [CHAR LIMIT=NONE] --> <string name="touchpad_tutorial_next_button">Next</string> <!-- Screen title after gesture was not done correctly [CHAR LIMIT=NONE] --> <!-- Screen title after gesture was not done correctly [CHAR LIMIT=NONE] --> <string name="gesture_error_title">Try again!</string> <string name="gesture_error_title">Try again!</string> <!-- BACK GESTURE --> <!-- BACK GESTURE --> Loading packages/SystemUI/src/com/android/systemui/inputdevice/tutorial/TouchpadTutorialScreensProvider.kt +4 −2 Original line number Original line Diff line number Diff line Loading @@ -20,7 +20,9 @@ import androidx.compose.runtime.Composable interface TouchpadTutorialScreensProvider { interface TouchpadTutorialScreensProvider { @Composable fun BackGesture(onDoneButtonClicked: () -> Unit, onBack: () -> Unit) @Composable fun BackGesture(onDoneButtonClicked: () -> Unit, onBack: () -> Unit, isAutoProceed: Boolean) @Composable fun HomeGesture(onDoneButtonClicked: () -> Unit, onBack: () -> Unit) @Composable fun HomeGesture(onDoneButtonClicked: () -> Unit, onBack: () -> Unit, isAutoProceed: Boolean) } } packages/SystemUI/src/com/android/systemui/inputdevice/tutorial/ui/composable/ActionTutorialContent.kt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -137,6 +137,7 @@ fun ActionTutorialContent( onDoneButtonClicked = onDoneButtonClicked, onDoneButtonClicked = onDoneButtonClicked, modifier = Modifier.padding(horizontal = 60.dp).graphicsLayer { alpha = buttonAlpha }, modifier = Modifier.padding(horizontal = 60.dp).graphicsLayer { alpha = buttonAlpha }, enabled = actionState is Finished, enabled = actionState is Finished, isNext = config.hasNextButton, ) ) } } } } Loading packages/SystemUI/src/com/android/systemui/inputdevice/tutorial/ui/composable/TutorialComponents.kt +5 −1 Original line number Original line Diff line number Diff line Loading @@ -32,6 +32,7 @@ fun DoneButton( onDoneButtonClicked: () -> Unit, onDoneButtonClicked: () -> Unit, modifier: Modifier = Modifier, modifier: Modifier = Modifier, enabled: Boolean = true, enabled: Boolean = true, isNext: Boolean = false, ) { ) { Row( Row( horizontalArrangement = Arrangement.End, horizontalArrangement = Arrangement.End, Loading @@ -39,7 +40,10 @@ fun DoneButton( modifier = modifier.fillMaxWidth(), modifier = modifier.fillMaxWidth(), ) { ) { Button(onClick = onDoneButtonClicked, enabled = enabled) { Button(onClick = onDoneButtonClicked, enabled = enabled) { Text(stringResource(R.string.touchpad_tutorial_done_button)) val text = if (isNext) R.string.touchpad_tutorial_next_button else R.string.touchpad_tutorial_done_button Text(stringResource(text)) } } } } } } packages/SystemUI/src/com/android/systemui/inputdevice/tutorial/ui/composable/TutorialScreenConfig.kt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ data class TutorialScreenConfig( val colors: Colors, val colors: Colors, val strings: Strings, val strings: Strings, val animations: Animations, val animations: Animations, val hasNextButton: Boolean = false, ) { ) { data class Colors( data class Colors( Loading Loading
packages/SystemUI/res/values/strings.xml +2 −0 Original line number Original line Diff line number Diff line Loading @@ -4010,6 +4010,8 @@ <string name="touchpad_tutorial_switch_apps_gesture_button">Switch apps</string> <string name="touchpad_tutorial_switch_apps_gesture_button">Switch apps</string> <!-- Label for button finishing touchpad tutorial [CHAR LIMIT=NONE] --> <!-- Label for button finishing touchpad tutorial [CHAR LIMIT=NONE] --> <string name="touchpad_tutorial_done_button">Done</string> <string name="touchpad_tutorial_done_button">Done</string> <!-- Label for button proceeding touchpad tutorial [CHAR LIMIT=NONE] --> <string name="touchpad_tutorial_next_button">Next</string> <!-- Screen title after gesture was not done correctly [CHAR LIMIT=NONE] --> <!-- Screen title after gesture was not done correctly [CHAR LIMIT=NONE] --> <string name="gesture_error_title">Try again!</string> <string name="gesture_error_title">Try again!</string> <!-- BACK GESTURE --> <!-- BACK GESTURE --> Loading
packages/SystemUI/src/com/android/systemui/inputdevice/tutorial/TouchpadTutorialScreensProvider.kt +4 −2 Original line number Original line Diff line number Diff line Loading @@ -20,7 +20,9 @@ import androidx.compose.runtime.Composable interface TouchpadTutorialScreensProvider { interface TouchpadTutorialScreensProvider { @Composable fun BackGesture(onDoneButtonClicked: () -> Unit, onBack: () -> Unit) @Composable fun BackGesture(onDoneButtonClicked: () -> Unit, onBack: () -> Unit, isAutoProceed: Boolean) @Composable fun HomeGesture(onDoneButtonClicked: () -> Unit, onBack: () -> Unit) @Composable fun HomeGesture(onDoneButtonClicked: () -> Unit, onBack: () -> Unit, isAutoProceed: Boolean) } }
packages/SystemUI/src/com/android/systemui/inputdevice/tutorial/ui/composable/ActionTutorialContent.kt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -137,6 +137,7 @@ fun ActionTutorialContent( onDoneButtonClicked = onDoneButtonClicked, onDoneButtonClicked = onDoneButtonClicked, modifier = Modifier.padding(horizontal = 60.dp).graphicsLayer { alpha = buttonAlpha }, modifier = Modifier.padding(horizontal = 60.dp).graphicsLayer { alpha = buttonAlpha }, enabled = actionState is Finished, enabled = actionState is Finished, isNext = config.hasNextButton, ) ) } } } } Loading
packages/SystemUI/src/com/android/systemui/inputdevice/tutorial/ui/composable/TutorialComponents.kt +5 −1 Original line number Original line Diff line number Diff line Loading @@ -32,6 +32,7 @@ fun DoneButton( onDoneButtonClicked: () -> Unit, onDoneButtonClicked: () -> Unit, modifier: Modifier = Modifier, modifier: Modifier = Modifier, enabled: Boolean = true, enabled: Boolean = true, isNext: Boolean = false, ) { ) { Row( Row( horizontalArrangement = Arrangement.End, horizontalArrangement = Arrangement.End, Loading @@ -39,7 +40,10 @@ fun DoneButton( modifier = modifier.fillMaxWidth(), modifier = modifier.fillMaxWidth(), ) { ) { Button(onClick = onDoneButtonClicked, enabled = enabled) { Button(onClick = onDoneButtonClicked, enabled = enabled) { Text(stringResource(R.string.touchpad_tutorial_done_button)) val text = if (isNext) R.string.touchpad_tutorial_next_button else R.string.touchpad_tutorial_done_button Text(stringResource(text)) } } } } } }
packages/SystemUI/src/com/android/systemui/inputdevice/tutorial/ui/composable/TutorialScreenConfig.kt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ data class TutorialScreenConfig( val colors: Colors, val colors: Colors, val strings: Strings, val strings: Strings, val animations: Animations, val animations: Animations, val hasNextButton: Boolean = false, ) { ) { data class Colors( data class Colors( Loading