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

Commit 8584613e authored by yyalan's avatar yyalan
Browse files

[OOBE] Renaming Done button to Next in OOBE flow (1/n)

Only applies to the 1st to n-1th tutorials in OOBE flow

Bug: 369818644
Flag: com.android.systemui.shared.new_touchpad_gestures_tutorial
Test: Manual for now, unit tests in follow ups
Change-Id: Ie7037e7cbf3f6240572438bb47aaa6c2f4a3acec
parent a2dff5f2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4001,6 +4001,8 @@
    <string name="touchpad_tutorial_switch_apps_gesture_button">Switch apps</string>
    <!-- Label for button finishing touchpad tutorial [CHAR LIMIT=NONE] -->
    <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] -->
    <string name="gesture_error_title">Try again!</string>
    <!-- BACK GESTURE -->
+4 −2
Original line number Diff line number Diff line
@@ -20,7 +20,9 @@ import androidx.compose.runtime.Composable

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)
}
+1 −0
Original line number Diff line number Diff line
@@ -137,6 +137,7 @@ fun ActionTutorialContent(
            onDoneButtonClicked = onDoneButtonClicked,
            modifier = Modifier.padding(horizontal = 60.dp).graphicsLayer { alpha = buttonAlpha },
            enabled = actionState is Finished,
            isNext = config.hasNextButton,
        )
    }
}
+5 −1
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ fun DoneButton(
    onDoneButtonClicked: () -> Unit,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    isNext: Boolean = false,
) {
    Row(
        horizontalArrangement = Arrangement.End,
@@ -39,7 +40,10 @@ fun DoneButton(
        modifier = modifier.fillMaxWidth(),
    ) {
        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))
        }
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ data class TutorialScreenConfig(
    val colors: Colors,
    val strings: Strings,
    val animations: Animations,
    val hasNextButton: Boolean = false,
) {

    data class Colors(
Loading