Composable Function

LazyColumn

The vertically scrolling list that only composes and lays out the currently visible items.

LazyColumnSample

@Composable
fun LazyColumnSample() {
    val itemsList = (0..5).toList()
    val itemsIndexedList = listOf("A", "B", "C")
    LazyColumn {
        items(itemsList) { Text("Item is $it") }
        item { Text("Single item") }
        itemsIndexed(itemsIndexedList) { index, item -> Text("Item at index $index is $item") }
    }
}