Recall & Review
beginner
What is LazyRow in Jetpack Compose?
LazyRow is a composable that displays a horizontally scrolling list. It only composes and lays out visible items, improving performance for long lists.
Click to reveal answer
beginner
How do you add spacing between items in a LazyRow?
You can add spacing by using the
horizontalArrangement parameter with Arrangement.spacedBy(dp) to set space between items.Click to reveal answer
intermediate
Why use LazyRow instead of Row for horizontal lists?
LazyRow only creates items that are visible on screen, saving memory and CPU. Row creates all items at once, which can be slow and use more memory for large lists.
Click to reveal answer
beginner
How do you handle item clicks inside a LazyRow?
You wrap each item in a clickable modifier like
Modifier.clickable { /* handle click */ } to respond to user taps.Click to reveal answer
beginner
What parameter do you use to provide the list of items to LazyRow?
You use the
items function inside LazyRow's content block to pass a list and define how each item looks.Click to reveal answer
What does LazyRow do in Jetpack Compose?
✗ Incorrect
LazyRow shows a horizontal list and only composes visible items for better performance.
How can you add space between items in a LazyRow?
✗ Incorrect
horizontalArrangement controls spacing between items horizontally in LazyRow.
Which modifier allows an item in LazyRow to respond to taps?
✗ Incorrect
Modifier.clickable() makes an item respond to user clicks.
Why is LazyRow preferred over Row for long horizontal lists?
✗ Incorrect
LazyRow improves performance by only composing visible items.
How do you provide data items to LazyRow?
✗ Incorrect
items() inside LazyRow lets you pass a list and define each item's UI.
Explain how LazyRow improves performance compared to a regular Row when displaying many items horizontally.
Think about how many items are created and drawn on screen.
You got /4 concepts.
Describe how you would add clickable behavior and spacing between items in a LazyRow.
Consider modifiers and LazyRow parameters.
You got /4 concepts.