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(placeholder: @Composable () -> Unit, modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), width: Constraint = Constraint.Wrap, height: Constraint = Constraint.Wrap, margin: Margin = Margin.Zero, horizontalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, content: LazyListScope.() -> Unit)
@Composable
fun LazyColumn(refreshing: Boolean, onRefresh: () -> Unit?, placeholder: @Composable () -> Unit, modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), width: Constraint = Constraint.Wrap, height: Constraint = Constraint.Wrap, margin: Margin = Margin.Zero, horizontalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, pullRefreshContentColor: UInt, 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 LazyList(isVertical: Boolean, onViewportChanged: (Int, Int) -> Unit, itemsBefore: Int, itemsAfter: Int, width: Constraint, height: Constraint, margin: Margin, crossAxisAlignment: CrossAxisAlignment, scrollItemIndex: ScrollItemIndex, modifier: Modifier = Modifier, placeholder: @Composable () -> Unit, items: @Composable () -> Unit)
Link copied to clipboard
@Composable
fun LazyRow(placeholder: @Composable () -> Unit, modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), width: Constraint = Constraint.Wrap, height: Constraint = Constraint.Wrap, margin: Margin = Margin.Zero, verticalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, content: LazyListScope.() -> Unit)
@Composable
fun LazyRow(refreshing: Boolean, onRefresh: () -> Unit?, placeholder: @Composable () -> Unit, modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), width: Constraint = Constraint.Wrap, height: Constraint = Constraint.Wrap, margin: Margin = Margin.Zero, verticalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, pullRefreshContentColor: UInt, 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
@Composable
fun RefreshableLazyList(isVertical: Boolean, onViewportChanged: (Int, Int) -> Unit, itemsBefore: Int, itemsAfter: Int, refreshing: Boolean, onRefresh: () -> Unit?, width: Constraint, height: Constraint, margin: Margin, crossAxisAlignment: CrossAxisAlignment, scrollItemIndex: ScrollItemIndex, pullRefreshContentColor: UInt, modifier: Modifier = Modifier, placeholder: @Composable () -> Unit, items: @Composable () -> Unit)
Link copied to clipboard

Creates a LazyListState that is remembered across compositions.