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

Commit 5bcc7a0c authored by Chaohui Wang's avatar Chaohui Wang
Browse files

[Spa] Make ListPreference content scrollable

To fix issue when content height larger than dialog height.

Fix: 335789740
Test: gallery - with large display size
Change-Id: I49e695cd5f7bc4dd4d104b29afa98b834dcfb63c
parent 7d0f3c90
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -22,8 +22,10 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.selection.selectable
import androidx.compose.foundation.selection.selectableGroup
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.RadioButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.IntState
@@ -86,7 +88,7 @@ fun ListPreference(model: ListPreferenceModel) {
            title = model.title,
            onDismissRequest = { dialogOpened = false },
        ) {
            Column(modifier = Modifier.selectableGroup()) {
            Column(modifier = Modifier.selectableGroup().verticalScroll(rememberScrollState())) {
                for (option in model.options) {
                    Radio(option, model.selectedId.intValue, model.enabled()) {
                        dialogOpened = false