T - The type of the model the size should be provided for.public class FixedPreloadSizeProvider<T> extends Object implements ListPreloader.PreloadSizeProvider<T>
ListPreloader.PreloadSizeProvider with a fixed width and height.| Constructor and Description |
|---|
FixedPreloadSizeProvider(int width,
int height)
Constructor for a PreloadSizeProvider with a fixed size.
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
getPreloadSize(T item,
int adapterPosition,
int itemPosition)
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. |
public FixedPreloadSizeProvider(int width,
int height)
width - The width of the preload size in pixels.height - The height of the preload size in pixels.public int[] getPreloadSize(T item, int adapterPosition, int itemPosition)
ListPreloader.PreloadSizeProvidernull if no size is currently available.
Note - The dimensions returned here must precisely match those of the view in the list.
getPreloadSize in interface ListPreloader.PreloadSizeProvider<T>item - A model