mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-08-09 08:27:54 +00:00
feat: make language selection bottom sheet scrollable
- Refactored `AppearanceLanguageBottomSheet` in `AppearanceSettingsPage.kt` to use a `LazyColumn` instead of a standard `Column`. - Wrapped the sheet title inside an `item` block and used `itemsIndexed` to render the language options. - This resolves an issue where the language list was truncated and unscrollable, particularly in landscape mode or when the list of translations grows.
This commit is contained in:
parent
2fa1c87ae7
commit
8b120438b1
1 changed files with 13 additions and 10 deletions
|
|
@ -13,6 +13,8 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
|||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.itemsIndexed
|
||||
import androidx.compose.foundation.lazy.LazyListScope
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
|
|
@ -213,21 +215,22 @@ private fun AppearanceLanguageBottomSheet(
|
|||
},
|
||||
sheetState = sheetState,
|
||||
) {
|
||||
Column(
|
||||
LazyColumn(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(bottom = 16.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(0.dp),
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(Res.string.settings_appearance_app_language_sheet_title),
|
||||
style = MaterialTheme.typography.titleLarge,
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
modifier = Modifier.padding(horizontal = 16.dp, vertical = 14.dp),
|
||||
)
|
||||
item {
|
||||
Text(
|
||||
text = stringResource(Res.string.settings_appearance_app_language_sheet_title),
|
||||
style = MaterialTheme.typography.titleLarge,
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
modifier = Modifier.padding(horizontal = 16.dp, vertical = 14.dp),
|
||||
)
|
||||
}
|
||||
|
||||
options.forEachIndexed { index, option ->
|
||||
itemsIndexed(options) { index, option ->
|
||||
if (index > 0) {
|
||||
NuvioBottomSheetDivider()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue