Component - LazyRow for horizontal lists
The LazyRow is a UI component in Android Jetpack Compose that shows a horizontal scrolling list. It only creates the visible items on screen, which helps the app run smoothly even with many items.
The LazyRow is a UI component in Android Jetpack Compose that shows a horizontal scrolling list. It only creates the visible items on screen, which helps the app run smoothly even with many items.
LazyRow ├── Item 1 (Text) ├── Item 2 (Text) ├── Item 3 (Text) └── ...
LazyRow in Android Compose?itemsList?items() function to iterate over a list and display each item.items(itemsList) { item -> Text(item) }. Options B, C, and D use invalid or unsupported syntax for LazyRow.val colors = listOf("Red", "Green", "Blue")
LazyRow {
items(colors) { color ->
Text(text = color)
}
}LazyRow {
items(listOf("A", "B", "C")) { item ->
Text item
}
}Text item should be Text(item).Pass the test and this pattern moves unknown