Google is committed to advancing racial equity for Black communities. See how.

LazyListScope

interface LazyListScope
androidx.compose.foundation.lazy.LazyListScope

Receiver scope which is used by LazyColumn and LazyRow.

Summary

Public methods
abstract Unit
item(content: LazyItemScope.() -> Unit)

Adds a single item to the scope.

abstract Unit
items(items: List<T>, itemContent: LazyItemScope.(item: T) -> Unit)

Adds a list of items and their content to the scope.

abstract Unit
itemsIndexed(items: List<T>, itemContent: LazyItemScope.(index: Int, item: T) -> Unit)

Adds a list of items to the scope where the content of an item is aware of its index.

Public methods

item

abstract fun item(content: LazyItemScope.() -> Unit): Unit

Adds a single item to the scope.

Parameters
content: LazyItemScope.() -> Unit the content of the item

items

abstract fun <T : Any> items(
    items: List<T>,
    itemContent: LazyItemScope.(item: T) -> Unit
): Unit

Adds a list of items and their content to the scope.

Parameters
items: List<T> the data list
itemContent: LazyItemScope.(item: T) -> Unit the content displayed by a single item

itemsIndexed

abstract fun <T : Any> itemsIndexed(
    items: List<T>,
    itemContent: LazyItemScope.(index: Int, item: T) -> Unit
): Unit

Adds a list of items to the scope where the content of an item is aware of its index.

Parameters
items: List<T> the data list
itemContent: LazyItemScope.(index: Int, item: T) -> Unit the content displayed by a single item