Object

LazyStaggeredGridDefaults

Contains the default values used by LazyVerticalStaggeredGrid and LazyHorizontalStaggeredGrid.

Source set: Common
public object LazyStaggeredGridDefaults

Contains the default values used by LazyVerticalStaggeredGrid and LazyHorizontalStaggeredGrid.

Functions

cacheWindow

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

Creates and remembers the default LazyLayoutCacheWindow for LazyVerticalStaggeredGrid and LazyHorizontalStaggeredGrid.

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

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

Parameters

state the LazyStaggeredGridState used to calculate the average visible item size

Return

the default LazyLayoutCacheWindow

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: