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

Commit e3dcebf5 authored by Chaohui Wang's avatar Chaohui Wang Committed by Android (Google) Code Review
Browse files

Merge "[Spa] Set SettingsDropdownCheckBox as mutilate lines" into main

parents cbc8a258 091807e3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -73,8 +73,8 @@ object SettingsDropdownCheckBoxProvider : SettingsPageProvider {
                label = "With disabled item",
                options = remember {
                    listOf(
                        SettingsDropdownCheckOption("Item 1"),
                        SettingsDropdownCheckOption("Item 2"),
                        SettingsDropdownCheckOption("Enabled item 1"),
                        SettingsDropdownCheckOption("Enabled item 2"),
                        SettingsDropdownCheckOption(
                            text = "Disabled item 1",
                            changeable = false,
@@ -101,8 +101,8 @@ object SettingsDropdownCheckBoxProvider : SettingsPageProvider {
                remember {
                    listOf(
                        SettingsDropdownCheckOption("All", isSelectAll = true, changeable = false),
                        SettingsDropdownCheckOption("Item 1"),
                        SettingsDropdownCheckOption("Item 2"),
                        SettingsDropdownCheckOption("Enabled item 1"),
                        SettingsDropdownCheckOption("Enabled item 2"),
                        SettingsDropdownCheckOption(
                            text = "Disabled item 1",
                            changeable = false,
+2 −1
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ internal fun DropdownTextBox(
    text: String,
    enabled: Boolean = true,
    errorMessage: String? = null,
    singleLine: Boolean = true,
    content: @Composable DropdownTextBoxScope.() -> Unit,
) {
    var expanded by remember { mutableStateOf(false) }
@@ -70,7 +71,7 @@ internal fun DropdownTextBox(
            onValueChange = { },
            label = { Text(text = label) },
            trailingIcon = { ExposedDropdownMenuDefaults.TrailingIcon(expanded = expanded) },
            singleLine = true,
            singleLine = singleLine,
            readOnly = true,
            enabled = enabled,
            isError = errorMessage != null,
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ fun SettingsDropdownCheckBox(
        text = getDisplayText(options) ?: emptyText,
        enabled = enabled && options.changeable,
        errorMessage = errorMessage,
        singleLine = false,
    ) {
        for (option in options) {
            CheckboxItem(option) {