Package com.bumptech.glide.util
Class FixedPreloadSizeProvider<T>
- java.lang.Object
-
- com.bumptech.glide.util.FixedPreloadSizeProvider<T>
-
- Type Parameters:
T- The type of the model the size should be provided for.
- All Implemented Interfaces:
ListPreloader.PreloadSizeProvider<T>
public class FixedPreloadSizeProvider<T> extends java.lang.Object implements ListPreloader.PreloadSizeProvider<T>
AListPreloader.PreloadSizeProviderwith 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
All Methods Instance Methods Concrete Methods Modifier and Type Method 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], ornullif no size is currently available.
-
-
-
Method Detail
-
getPreloadSize
@Nullable public int[] getPreloadSize(@NonNull T item, int adapterPosition, int itemPosition)Description copied from interface:ListPreloader.PreloadSizeProviderReturns the size of the view in the list where the resources will be displayed in pixels in the format [x, y], ornullif no size is currently available.Note - The dimensions returned here must precisely match those of the view in the list.
If this method returns
null, then no request will be started for the given item.- Specified by:
getPreloadSizein interfaceListPreloader.PreloadSizeProvider<T>- Parameters:
item- A model
-
-