frank
04/06/2022, 4:37 PMColumn() {
Surface(
color = MaterialTheme.colors.primary
) {
Text(
"Users:",
Modifier.fillMaxWidth(),
style = MaterialTheme.typography.h5.copy(fontWeight = FontWeight.ExtraBold),
textAlign = TextAlign.Center
)
}
Divider()
LazyColumn( // List names
modifier = Modifier.padding(vertical = 4.dp)
) {
items(names) { name ->
NamePickerItem(name)
}
}
NamePickerName(name = "LuisEnrique2") // Extra item for compare
}
Tobias Gronbach
04/07/2022, 12:09 AMfrank
04/07/2022, 2:22 PMWhat happens when you add .weight(1f) to the modifier of the LazyColumn (or a fixed height)? Does that change anything?@Tobias Gronbach, The extra item will always be show but, I don't want this. (Attach img) I searched info. about scrolls and the columns don't add by default a Scroll. If I want a Scroll in my Column I need add this modifier
Modifier.verticalScroll(rememberScrollState())
but this throw conflict with lazyColumn.
I fixed it by moving '*extra item*' inside the lazyColum. (I have to check if there is a better approach)
LazyColumn( // List names
modifier = Modifier
.padding(vertical = 4.dp)
) {
items(names) { name ->
NamePickerItem(name)
}
item { // Extra item
NamePickerName(name = "LuisEnrique2")
}
}