{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

LazyLayoutPrefetchState

@ExperimentalFoundationApi
public final class LazyLayoutPrefetchState


State for lazy items prefetching, used by lazy layouts to instruct the prefetcher.

Summary

Nested types

Public constructors

Public methods

final @NonNull LazyLayoutPrefetchState.PrefetchHandle
schedulePrefetch(int index, @NonNull Constraints constraints)

Schedules precomposition and premeasure for the new item.

Public constructors

LazyLayoutPrefetchState

public LazyLayoutPrefetchState()

Public methods

schedulePrefetch

public final @NonNull LazyLayoutPrefetchState.PrefetchHandle schedulePrefetch(int index, @NonNull Constraints constraints)

Schedules precomposition and premeasure for the new item.

Parameters
int index

item index to prefetch.

@NonNull Constraints constraints

Constraints to use for premeasuring.