-
- All Implemented Interfaces:
-
com.mobwith.imgmodule.ListPreloader.PreloadSizeProvider
public class FixedPreloadSizeProvider<T> implements ListPreloader.PreloadSizeProvider<T>
A ListPreloader.PreloadSizeProvider with a fixed width and height.
-
-
Constructor Summary
Constructors Constructor Description FixedPreloadSizeProvider(int width, int height)Constructor for a PreloadSizeProvider with a fixed size.
-
Method Summary
Modifier and Type Method Description Array<int>getPreloadSize(@NonNull() T item, int adapterPosition, int itemPosition)Returns the size of the view in the list where the resources will be displayed in pixels inthe format [x, y], or {@code null}if no size is currently available.-
-
Method Detail
-
getPreloadSize
@Nullable() Array<int> getPreloadSize(@NonNull() T item, int adapterPosition, int itemPosition)
Returns the size of the view in the list where the resources will be displayed in pixels inthe format [x, y], or
{@code null}if no size is currently available.Note - The dimensions returned here must precisely match those of the view in the list.
If this method returns
{@code null}, then no request will be started for the given item.- Parameters:
item- A model
-
-
-
-