Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
interface LazyListScope

Receiver scope which is used by LazyColumn and LazyRow.

Link copied to clipboard
open class LazyListState

A state object that can be hoisted to control and observe scrolling.

Functions

Link copied to clipboard
inline fun <T> LazyListScope.items(items: Array<T>, crossinline itemContent: @Composable (item: T) -> Unit)

Adds an array of items.

inline fun <T> LazyListScope.items(items: List<T>, crossinline itemContent: @Composable (item: T) -> Unit)

Adds a list of items.

Link copied to clipboard
inline fun <T> LazyListScope.itemsIndexed(items: Array<T>, crossinline itemContent: @Composable (index: Int, item: T) -> Unit)

Adds an array of items where the content of an item is aware of its index.

inline fun <T> LazyListScope.itemsIndexed(items: List<T>, crossinline itemContent: @Composable (index: Int, item: T) -> Unit)

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

Link copied to clipboard
@Composable
fun LazyColumn(state: LazyListState = rememberLazyListState(), width: Constraint = Constraint.Wrap, height: Constraint = Constraint.Wrap, margin: Margin = Margin.Zero, horizontalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, modifier: Modifier = Modifier, placeholder: @Composable () -> Unit, content: LazyListScope.() -> Unit)
@Composable
fun LazyColumn(refreshing: Boolean, onRefresh: () -> Unit?, state: LazyListState = rememberLazyListState(), width: Constraint = Constraint.Wrap, height: Constraint = Constraint.Wrap, margin: Margin = Margin.Zero, horizontalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, pullRefreshContentColor: UInt, modifier: Modifier = Modifier, placeholder: @Composable () -> Unit, content: LazyListScope.() -> Unit)

The vertically scrolling list that only composes and lays out the currently visible items. The content block defines a DSL which allows you to emit items of different types. For example you can use LazyListScope.item to add a single item and LazyListScope.items to add a list of items.

Link copied to clipboard
@Composable
fun LazyRow(state: LazyListState = rememberLazyListState(), width: Constraint = Constraint.Wrap, height: Constraint = Constraint.Wrap, margin: Margin = Margin.Zero, verticalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, modifier: Modifier = Modifier, placeholder: @Composable () -> Unit, content: LazyListScope.() -> Unit)
@Composable
fun LazyRow(refreshing: Boolean, onRefresh: () -> Unit?, state: LazyListState = rememberLazyListState(), width: Constraint = Constraint.Wrap, height: Constraint = Constraint.Wrap, margin: Margin = Margin.Zero, verticalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, pullRefreshContentColor: UInt, modifier: Modifier = Modifier, placeholder: @Composable () -> Unit, content: LazyListScope.() -> Unit)

The horizontally scrolling list that only composes and lays out the currently visible items. The content block defines a DSL which allows you to emit items of different types. For example you can use LazyListScope.item to add a single item and LazyListScope.items to add a list of items.

Link copied to clipboard

Creates a LazyListState that is remembered across compositions.