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

Commit 4f527b91 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[OOBE] Renaming Done button to Next in OOBE flow (1/n)" into main

parents 13dcb866 8584613e
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -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 -->
+4 −2
Original line number Original line Diff line number Diff line
@@ -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)
}
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -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,
        )
        )
    }
    }
}
}
+5 −1
Original line number Original line Diff line number Diff line
@@ -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,
@@ -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))
        }
        }
    }
    }
}
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -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