Hi, I want to put items at bottom of `LazyColumn`....
# compose
k
Hi, I want to put items at bottom of
LazyColumn
. 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?
Copy code
LazyColumn(
            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 
            }
        }
KqtHs.png
a
why would you want them inside the lazyColumn?
k
In my
itemsIndexed
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.
a
try
Copy code
Column {
    LazyColumn(
        modifier = Modifier.weight(1f),
        ...,
    ) { ... }
    Button()
    Button()
}
k
Sure, thanks
k
Do not put a scrollable container inside another scrollable container
k
What will happen then, If I do that?
k
In this example it might be ok if you use weights correctly so that the outer column is not scrollable
k
okk
Thanks for guidance