ListPreloader

open class ListPreloader<T>

Loads a few resources ahead in the direction of scrolling in any AbsListView so that images are in the memory cache just before the corresponding view in created in the list. Gives the appearance of an infinitely large image cache, depending on scrolling speed, cpu speed, and cache size.

Must be put using setOnScrollListener, or have its corresponding methods called from another android.widget.AbsListView.OnScrollListener to function.

Parameters

<T>

The type of the model being displayed in the list.

Constructors

Link copied to clipboard
open fun ListPreloader(    requestManager: RequestManager,     preloadModelProvider: ListPreloader.PreloadModelProvider<T>,     preloadDimensionProvider: ListPreloader.PreloadSizeProvider<T>,     maxPreload: Int)
Constructor for com.bumptech.glide.ListPreloader that accepts interfaces for providing the dimensions of images to preload, the list of models to preload for a given position, and the request to use to load images.

Types

Link copied to clipboard
interface PreloadModelProvider<U>
An implementation of PreloadModelProvider should provide all the models that should be preloaded.
Link copied to clipboard
interface PreloadSizeProvider<T>
An implementation of PreloadSizeProvider should provide the size of the view in the list where the resources will be displayed.

Functions

Link copied to clipboard
open fun onScroll(    absListView: AbsListView,     firstVisible: Int,     visibleCount: Int,     totalCount: Int)
Link copied to clipboard
open fun onScrollStateChanged(absListView: AbsListView, scrollState: Int)