Package com.bumptech.glide
Interface ListPreloader.PreloadSizeProvider<T>
-
- Type Parameters:
T- The type of the model the size should be provided for.
- All Known Implementing Classes:
FixedPreloadSizeProvider,ViewPreloadSizeProvider
- Enclosing class:
- ListPreloader<T>
public static interface ListPreloader.PreloadSizeProvider<T>An implementation of PreloadSizeProvider should provide the size of the view in the list where the resources will be displayed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int[]getPreloadSize(T item, int adapterPosition, int perItemPosition)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 int[] getPreloadSize(@NonNull T item, int adapterPosition, int perItemPosition)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.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.- Parameters:
item- A model
-
-