KotlinLeaner
01/31/2023, 3:20 PMLazyColumn
. So what is the best recommended way of doing in LazyColumn
. Some content I put in item
or itemIndexed
which is correctly, but unable to know how to stick in bottom of screen?KotlinLeaner
01/31/2023, 3:20 PMLazyColumn(
contentPadding = PaddingValues(
horizontal = 16.dp, vertical = 16.dp)
),
verticalArrangement = Arrangement.spacedBy(16.dp),
) {
item { Header() }
itemsIndexed(storedDevice) { index, item ->
Label({ index }, item, { list.size })
}
item {
Button() // stick in bottom of screen
Button() // stick in bottom of screen
}
}
KotlinLeaner
01/31/2023, 3:21 PMAltynbek Nurtaza
01/31/2023, 3:33 PMKotlinLeaner
01/31/2023, 3:35 PMitemsIndexed
there are so many item, that's why I used LazyColumn
for better performance in my smaller devices. I don't have any preference to put item at bottom in LazyColumn.Altynbek Nurtaza
01/31/2023, 3:37 PMColumn {
LazyColumn(
modifier = Modifier.weight(1f),
...,
) { ... }
Button()
Button()
}
KotlinLeaner
01/31/2023, 3:38 PMKirill Grouchnikov
01/31/2023, 5:05 PMKotlinLeaner
01/31/2023, 5:06 PMKirill Grouchnikov
01/31/2023, 5:07 PMKotlinLeaner
01/31/2023, 5:07 PMKotlinLeaner
01/31/2023, 5:07 PM