androidx.compose.foundation.lazy.grid
LazyGridScope
Sealed interface · from org.jetbrains.compose.foundation:foundation:1.12.2
No hand-written docs yet.
Receiver scope which is used by LazyVerticalGrid.
sealed interface LazyGridScope
Used by
Parameters that take a LazyGridScope.
Functions
item
fun item(
key: Any? = null,
span: (LazyGridItemSpanScope.() -> GridItemSpan)? = null,
contentType: Any? = null,
content: @Composable LazyGridItemScope.() -> Unit,
)
Adds a single item to the scope.
items
fun items(
count: Int,
key: ((index: Int) -> Any)? = null,
span: (LazyGridItemSpanScope.(index: Int) -> GridItemSpan)? = null,
contentType: (index: Int) -> Any? = { null },
itemContent: @Composable LazyGridItemScope.(index: Int) -> Unit,
)
Adds a count of items.
stickyHeaderSince 1.8
fun stickyHeader(
key: Any? = null,
contentType: Any? = null,
content: @Composable LazyGridItemScope.(Int) -> Unit,
)
Adds a sticky header item, which will remain pinned even when scrolling after it. The header will remain pinned until the next header will take its place. Sticky Headers are full span items, that is, they will occupy LazyGridItemSpanScope.maxLineSpan.
Library docs
Receiver scope which is used by LazyVerticalGrid.