androidx.compose.foundation.lazy.layout
LazyLayoutPrefetchState
Class · from org.jetbrains.compose.foundation:foundation:1.12.2
No hand-written docs yet.
State for lazy items prefetching, used by lazy layouts to instruct the prefetcher.
class LazyLayoutPrefetchState
Used by
Parameters that take a LazyLayoutPrefetchState.
Functions
schedulePrecompositionSince 1.9
fun schedulePrecomposition(index: Int): PrefetchHandle
Schedules precomposition for the new item. If you also want to premeasure the item please use schedulePrecompositionAndPremeasure instead. This function should only be called once per item. If the item has already been composed at the time this request executes, either from a previous call to this function or because the item is already visible, this request should have no meaningful effect.
schedulePrecompositionAndPremeasureSince 1.9
fun schedulePrecompositionAndPremeasure(
index: Int,
constraints: Constraints,
onItemPremeasured: (PrefetchResultScope.() -> Unit)? = null,
): PrefetchHandle
Schedules precomposition and premeasure for the new item. This should be used instead of schedulePrecomposition if you also want to premeasure the item. This function should only be called once per item. If the item has already been composed / measured at the time this request executes, either from a previous call to this function or because the item is already visible, this request should have no meaningful effect.
Nested types
PrefetchHandlePrefetchResultScope
Library docs
State for lazy items prefetching, used by lazy layouts to instruct the prefetcher.