LazyLayout
Common
Component in Compose Foundation
A layout that only composes and lays out currently needed items. Can be used to build efficient scrollable layouts.
Last updated:
Installation
dependencies {
implementation("androidx.compose.foundation:foundation:1.8.0-alpha04")
}
Overloads
@ExperimentalFoundationApi
@Composable
fun LazyLayout(
itemProvider: () -> LazyLayoutItemProvider,
modifier: Modifier = Modifier,
prefetchState: LazyLayoutPrefetchState? = null,
measurePolicy: LazyLayoutMeasureScope.(Constraints) -> MeasureResult
)
Parameters
name | description |
---|---|
itemProvider | lambda producing an item provider containing all the needed info about the items which could be used to compose and measure items as part of [measurePolicy]. |
modifier | to apply on the layout |
prefetchState | allows to schedule items for prefetching |
measurePolicy | Measure policy which allows to only compose and measure needed items. |