RecyclerView.LayoutManager.LayoutPrefetchRegistry


interface RecyclerView.LayoutManager.LayoutPrefetchRegistry


Interface for LayoutManagers to request items to be prefetched, based on position, with specified distance from viewport, which indicates priority.

Summary

Public functions

Unit
addPosition(layoutPosition: Int, pixelDistance: Int)

Requests an an item to be prefetched, based on position, with a specified distance, indicating priority.

Public functions

addPosition

Added in 1.0.0
fun addPosition(layoutPosition: Int, pixelDistance: Int): Unit

Requests an an item to be prefetched, based on position, with a specified distance, indicating priority.

Parameters
layoutPosition: Int

Position of the item to prefetch.

pixelDistance: Int

Distance from the current viewport to the bounds of the item, must be non-negative.