ViewPreloadSizeProvider

A com.bumptech.glide.ListPreloader.PreloadSizeProvider that will extract the preload size from a given android.view.View.

Parameters

<T>

The type of the model the size should be provided for.

Constructors

Link copied to clipboard
open fun ViewPreloadSizeProvider()
Constructor that does nothing by default and requires users to call setView when a View is available to registerComponents the dimensions returned by this class.
Link copied to clipboard
open fun ViewPreloadSizeProvider(view: View)
Constructor that will extract the preload size from a given android.view.

Functions

Link copied to clipboard
open fun getPreloadSize(    item: T,     adapterPosition: Int,     itemPosition: Int): Array<Int>
Returns the size of the view in the list where the resources will be displayed in pixels in the format [x, y], or null if no size is currently available.
Link copied to clipboard
open fun onSizeReady(width: Int, height: Int)
A callback called on the main thread.
Link copied to clipboard
open fun setView(view: View)
Sets the android.view.