Object

LazyGridDefaults

Contains the default values used by LazyVerticalGrid and LazyHorizontalGrid.

Source set: Common
public object LazyGridDefaults

Contains the default values used by LazyVerticalGrid and LazyHorizontalGrid.

Functions

cacheWindow

Source set: Common
@Composable
    public fun cacheWindow(state: LazyGridState): LazyLayoutCacheWindow

Creates and remembers the default LazyLayoutCacheWindow for LazyVerticalGrid and LazyHorizontalGrid.

    from state, clamped between 10% and 50% of the viewport.

  • Prefetches items ahead in the scroll direction based on the average size of visible lines
  • Does not retain items behind the viewport.
  • Does not cache while the user is not scrolling.

Parameters

state the LazyGridState used to calculate the average visible line size

Return

the default LazyLayoutCacheWindow

Content updated: