Package-level declarations

Types

Link copied to clipboard
class ColumnContentAlignment(val verticalArrangement: Arrangement.Vertical = Arrangement.Top, val horizontalAlignment: Alignment.Horizontal = Alignment.Start)
Link copied to clipboard
Link copied to clipboard
sealed class GridCells

This class describes how cells form columns in vertical grids or rows in horizontal grids.

Link copied to clipboard
interface LazyGridScope

Receiver scope which is used by LazyVerticalGrid.

Link copied to clipboard
class RowContentAlignment(val horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, val verticalAlignment: Alignment.Vertical = Alignment.Top)

Functions

Link copied to clipboard
Link copied to clipboard
fun LazyItemScope.DraggableItem(dragDropState: DragDropState, index: Int, modifier: Modifier = Modifier, content: @Composable ColumnScope.(isDragging: Boolean) -> Unit)
Link copied to clipboard
inline fun <T> LazyGridScope.items(items: Array<T>, crossinline itemContent: @Composable LazyItemScope.(item: T) -> Unit)

Adds an array of items.

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

Adds a list of items.

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

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

inline fun <T> LazyGridScope.itemsIndexed(items: List<T>, crossinline itemContent: @Composable LazyItemScope.(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
inline fun <T> LazyColumnFor(items: Array<T>, modifier: Modifier = Modifier, noinline key: (item: T) -> Any? = null, noinline contentType: (item: T) -> Any? = { null }, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, verticalArrangement: Arrangement.Vertical = if (!reverseLayout) Arrangement.Top else Arrangement.Bottom, horizontalAlignment: Alignment.Horizontal = Alignment.Start, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), userScrollEnabled: Boolean = true, crossinline itemContent: @Composable LazyItemScope.(item: T) -> Unit)

The vertical scrolling list that only composes and lays out the currently visible items. This composable shows only Array of items.

fun LazyColumnFor(count: Int, modifier: Modifier = Modifier, key: (index: Int) -> Any? = null, contentType: (index: Int) -> Any? = { null }, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, verticalArrangement: Arrangement.Vertical = if (!reverseLayout) Arrangement.Top else Arrangement.Bottom, horizontalAlignment: Alignment.Horizontal = Alignment.Start, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), userScrollEnabled: Boolean = true, itemContent: @Composable LazyItemScope.(index: Int) -> Unit)
inline fun <T> LazyColumnFor(items: List<T>, modifier: Modifier = Modifier, noinline key: (item: T) -> Any? = null, noinline contentType: (item: T) -> Any? = { null }, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, verticalArrangement: Arrangement.Vertical = if (!reverseLayout) Arrangement.Top else Arrangement.Bottom, horizontalAlignment: Alignment.Horizontal = Alignment.Start, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), userScrollEnabled: Boolean = true, crossinline itemContent: @Composable LazyItemScope.(item: T) -> Unit)

The vertical scrolling list that only composes and lays out the currently visible items. This composable shows only List of items.

Link copied to clipboard
inline fun <T> LazyColumnForIndexed(items: Array<T>, modifier: Modifier = Modifier, noinline key: (index: Int, item: T) -> Any? = null, noinline contentType: (index: Int, item: T) -> Any? = { _, _ -> null }, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, verticalArrangement: Arrangement.Vertical = if (!reverseLayout) Arrangement.Top else Arrangement.Bottom, horizontalAlignment: Alignment.Horizontal = Alignment.Start, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), userScrollEnabled: Boolean = true, crossinline itemContent: @Composable LazyItemScope.(index: Int, item: T) -> Unit)

The vertical scrolling list that only composes and lays out the currently visible items. This composable shows only Array of items.

inline fun <T> LazyColumnForIndexed(items: List<T>, modifier: Modifier = Modifier, noinline key: (index: Int, item: T) -> Any? = null, noinline contentType: (index: Int, item: T) -> Any? = { _, _ -> null }, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, verticalArrangement: Arrangement.Vertical = if (!reverseLayout) Arrangement.Top else Arrangement.Bottom, horizontalAlignment: Alignment.Horizontal = Alignment.Start, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), userScrollEnabled: Boolean = true, crossinline itemContent: @Composable LazyItemScope.(index: Int, item: T) -> Unit)

The vertical scrolling list that only composes and lays out the currently visible items. This composable shows only List of items.

Link copied to clipboard
fun LazyHorizontalGrid(cells: GridCells, modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), content: LazyGridScope.() -> Unit)
Link copied to clipboard
inline fun <T> LazyRowFor(items: Array<T>, modifier: Modifier = Modifier, noinline key: (item: T) -> Any? = null, noinline contentType: (item: T) -> Any? = { null }, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, horizontalArrangement: Arrangement.Horizontal = if (!reverseLayout) Arrangement.Start else Arrangement.End, verticalAlignment: Alignment.Vertical = Alignment.Top, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), userScrollEnabled: Boolean = true, crossinline itemContent: @Composable LazyItemScope.(item: T) -> Unit)

The vertical scrolling list that only composes and lays out the currently visible items. This composable shows only Array of items.

inline fun LazyRowFor(count: Int, modifier: Modifier = Modifier, noinline key: (index: Int) -> Any? = null, noinline contentType: (index: Int) -> Any? = { null }, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, horizontalArrangement: Arrangement.Horizontal = if (!reverseLayout) Arrangement.Start else Arrangement.End, verticalAlignment: Alignment.Vertical = Alignment.Top, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), userScrollEnabled: Boolean = true, noinline itemContent: @Composable LazyItemScope.(index: Int) -> Unit)
inline fun <T> LazyRowFor(items: List<T>, modifier: Modifier = Modifier, noinline key: (item: T) -> Any? = null, noinline contentType: (item: T) -> Any? = { null }, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, horizontalArrangement: Arrangement.Horizontal = if (!reverseLayout) Arrangement.Start else Arrangement.End, verticalAlignment: Alignment.Vertical = Alignment.Top, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), userScrollEnabled: Boolean = true, crossinline itemContent: @Composable LazyItemScope.(item: T) -> Unit)

The horizontal scrolling list that only composes and lays out the currently visible items. This composable shows only List of items.

Link copied to clipboard
inline fun <T> LazyRowForIndexed(items: Array<T>, modifier: Modifier = Modifier, noinline key: (index: Int, item: T) -> Any? = null, noinline contentType: (index: Int, item: T) -> Any? = { _, _ -> null }, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, horizontalArrangement: Arrangement.Horizontal = if (!reverseLayout) Arrangement.Start else Arrangement.End, verticalAlignment: Alignment.Vertical = Alignment.Top, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), userScrollEnabled: Boolean = true, crossinline itemContent: @Composable LazyItemScope.(index: Int, item: T) -> Unit)

The horizontal scrolling list that only composes and lays out the currently visible items. This composable shows only Array of items.

inline fun <T> LazyRowForIndexed(items: List<T>, modifier: Modifier = Modifier, noinline key: (index: Int, item: T) -> Any? = null, noinline contentType: (index: Int, item: T) -> Any? = { _, _ -> null }, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, horizontalArrangement: Arrangement.Horizontal = if (!reverseLayout) Arrangement.Start else Arrangement.End, verticalAlignment: Alignment.Vertical = Alignment.Top, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), userScrollEnabled: Boolean = true, crossinline itemContent: @Composable LazyItemScope.(index: Int, item: T) -> Unit)

The horizontal scrolling list that only composes and lays out the currently visible items. This composable shows only List of items.

Link copied to clipboard
fun LazyStaticGrid(modifier: Modifier = Modifier, columns: Int, itemCount: Int, fillLastRow: Boolean = true, rowContentAlignment: RowContentAlignment = RowContentAlignment(), columnContentAlignment: ColumnContentAlignment = ColumnContentAlignment(), content: @Composable RowScope.(itemIndex: Int) -> Unit)
fun <T> LazyStaticGrid(modifier: Modifier = Modifier, items: List<T>, columns: Int, fillLastRow: Boolean = true, rowContentAlignment: RowContentAlignment = RowContentAlignment(), columnContentAlignment: ColumnContentAlignment = ColumnContentAlignment(), content: @Composable RowScope.(itemIndex: T) -> Unit)
Link copied to clipboard
fun LazyStaticGridPreview(primary: Color = Color(0xFFA9D2B5), secondary: Color = Color(0xFF79BA98), milky: Color = Color(0xFFF9F8DD))
Link copied to clipboard
fun ListColumn(modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(), verticalArrangement: Arrangement.Vertical = Arrangement.Top, horizontalAlignment: Alignment.Horizontal = Alignment.Start, content: LazyListScope.() -> Unit)
fun <T> ListColumn(modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(), verticalArrangement: Arrangement.Vertical = Arrangement.Top, horizontalAlignment: Alignment.Horizontal = Alignment.Start, items: List<T> = emptyList(), content: @Composable (T) -> Unit)
fun <T> ListColumn(modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(), verticalArrangement: Arrangement.Vertical = Arrangement.Top, horizontalAlignment: Alignment.Horizontal = Alignment.Start, items: List<T> = emptyList(), content: @Composable (Int, T) -> Unit)
Link copied to clipboard
fun ListRow(modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(), verticalAlignment: Alignment.Vertical = Alignment.Top, horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, content: LazyListScope.() -> Unit)
fun <T> ListRow(modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(), verticalAlignment: Alignment.Vertical = Alignment.Top, horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, items: List<T> = emptyList(), content: @Composable (T) -> Unit)
fun <T> ListRow(modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(), verticalAlignment: Alignment.Vertical = Alignment.Top, horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, items: List<T> = emptyList(), content: @Composable (Int, T) -> Unit)
Link copied to clipboard
Link copied to clipboard
fun VerticalGrid(modifier: Modifier = Modifier, columns: Int = 2, content: @Composable () -> Unit)

Author: @Jeluchu