android: jetpack compose lazycolumn

Viewed 2104

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)
                }
            }
        }
    }
2 Answers

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

LazyColumn(
    reverseLayout= true, // << here
    modifier = Modifier.fillMaxSize()
) { .. }
Related