@Composable
fun LazyColumn01() {
LazyColumn(modifier = Modifier
.height(200.dp)
.background(Color.LightGray)) {
// Add a single item
item {
Text(text = "First item")
}
// Add 5 items
items(500) { index ->
Text(text = "Item: $index")
}
// Add another single item
item {
Text(text = "Last item")
}
}
}
10-18
701
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-13
7067
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-03
2907
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)