0Pricing
Jetpack Compose Academy · Lesson

items & itemsIndexed

Render a collection of data rows.

From Data to Rows

Your data usually lives in a list, like a List of strings or objects. The items block turns each element into a row on screen.

The items Function

Call items with your collection and a lambda. Compose runs the lambda for each element it needs to show.

LazyColumn {
    items(fruits) { fruit ->
        Text(fruit)
    }
}

All lessons in this course

  1. LazyColumn vs Scrollable Column
  2. items & itemsIndexed
  3. Keys for Stable, Fast Lists
  4. Sticky Headers & Section Lists
← Back to Jetpack Compose Academy