Improve ListItem logical item grouping
This commit is contained in:
parent
47f030cffe
commit
55f51a01a0
1 changed files with 36 additions and 35 deletions
|
|
@ -18,6 +18,7 @@ package io.element.android.features.poll.impl.create
|
||||||
|
|
||||||
import androidx.activity.compose.BackHandler
|
import androidx.activity.compose.BackHandler
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.consumeWindowInsets
|
import androidx.compose.foundation.layout.consumeWindowInsets
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
|
@ -110,13 +111,12 @@ fun CreatePollView(
|
||||||
.fillMaxSize(),
|
.fillMaxSize(),
|
||||||
) {
|
) {
|
||||||
item {
|
item {
|
||||||
|
Column {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = R.string.screen_create_poll_question_desc),
|
text = stringResource(id = R.string.screen_create_poll_question_desc),
|
||||||
modifier = Modifier.padding(start = 32.dp),
|
modifier = Modifier.padding(start = 32.dp),
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
)
|
)
|
||||||
}
|
|
||||||
item {
|
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = {
|
headlineContent = {
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
|
|
@ -135,6 +135,7 @@ fun CreatePollView(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
itemsIndexed(state.answers) { index, answer ->
|
itemsIndexed(state.answers) { index, answer ->
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = {
|
headlineContent = {
|
||||||
|
|
@ -175,9 +176,8 @@ fun CreatePollView(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
item {
|
item {
|
||||||
|
Column {
|
||||||
HorizontalDivider()
|
HorizontalDivider()
|
||||||
}
|
|
||||||
item {
|
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = { Text(text = stringResource(id = R.string.screen_create_poll_anonymous_headline)) },
|
headlineContent = { Text(text = stringResource(id = R.string.screen_create_poll_anonymous_headline)) },
|
||||||
supportingContent = { Text(text = stringResource(id = R.string.screen_create_poll_anonymous_desc)) },
|
supportingContent = { Text(text = stringResource(id = R.string.screen_create_poll_anonymous_desc)) },
|
||||||
|
|
@ -189,6 +189,7 @@ fun CreatePollView(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@DayNightPreviews
|
@DayNightPreviews
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue