Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android: jetpack compose lazycolumn

How can i show the lazycolumn from below? by default it shows me the list from above

   LazyColumn(){
        itemsIndexed(items = chat){ index, chat ->
            Column(modifier = Modifier.padding(top = 1.dp, start = 6.dp, bottom = 1.dp, end = 6.dp)) 
             {
                if(chat.sender.equals(MyId)){
                    ItemRigth(chat)
                }
                else{
                    ItemLeft(chat)
                }
            }
        }
    }
like image 795
Verlyn Luna Avatar asked Jun 04 '26 23:06

Verlyn Luna


1 Answers

If you set the reverseLayout param to true, the items will appear from the bottom.

LazyColumn(
    reverseLayout= true, // << here
    modifier = Modifier.fillMaxSize()
) { .. }
like image 140
nglauber Avatar answered Jun 07 '26 13:06

nglauber



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!