🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

LazyLayoutCacheWindow

A Dp-based LazyLayoutCacheWindow.

LazyLayoutCacheWindow

Source set: Common
public fun LazyLayoutCacheWindow(
    ahead: Dp = 0.dp,
    behind: Dp = 0.dp,
    isNonScrollCachingEnabled: Boolean = true,
): LazyLayoutCacheWindow

A Dp-based LazyLayoutCacheWindow.

Parameters

ahead The size of the ahead window to be used as per LazyLayoutCacheWindow.calculateAheadWindow.
behind The size of the behind window to be used as per LazyLayoutCacheWindow.calculateBehindWindow.
isNonScrollCachingEnabled whether the cache window populates after a non-scroll related trigger. When set to true, the cache window will use non-scroll triggers to start the caching process. For example, if layout data changes and causes a cache purge, the ahead window will be refilled while the layout remains idle. Other common scenarios in which the ahead window fills include initial composition and item reordering, during which the layout is in a non-scroll state, providing the opportunity to populate the window.

LazyLayoutCacheWindow

Source set: Common
public fun LazyLayoutCacheWindow(
    @FloatRange(from = 0.0) aheadFraction: Float = 0.0f,
    @FloatRange(from = 0.0) behindFraction: Float = 0.0f,
    isNonScrollCachingEnabled: Boolean = true,
): LazyLayoutCacheWindow

Creates a LazyLayoutCacheWindow based off a fraction of the viewport.

Parameters

aheadFraction The fraction of the viewport to be used for the ahead window.
behindFraction The fraction of the viewport to be used for the behind window.
isNonScrollCachingEnabled whether the cache window populates after a non-scroll related trigger. When set to true, the cache window will use non-scroll triggers to start the caching process. For example, if layout data changes and causes a cache purge, the ahead window will be refilled while the layout remains idle. Other common scenarios in which the ahead window fills include initial composition and item reordering, during which the layout is in a non-scroll state, providing the opportunity to populate the window.