com.bumptech.glide
Interface ListPreloader.PreloadModelProvider<U>

Type Parameters:
U - The type of the model being preloaded.
Enclosing class:
ListPreloader<T>

public static interface ListPreloader.PreloadModelProvider<U>

An implementation of PreloadModelProvider should provide all the models that should be preloaded.


Method Summary
 List<U> getPreloadItems(int position)
          Returns a non null list of all models that need to be loaded for the list to display adapter items in positions between start and end.
 GenericRequestBuilder getPreloadRequestBuilder(U item)
          Returns a non null GenericRequestBuilder for a given item.
 

Method Detail

getPreloadItems

List<U> getPreloadItems(int position)
Returns a non null list of all models that need to be loaded for the list to display adapter items in positions between start and end.

A list of any size can be returned so there can be multiple models per adapter position.

Parameters:
position - The adapter position.

getPreloadRequestBuilder

GenericRequestBuilder getPreloadRequestBuilder(U item)
Returns a non null GenericRequestBuilder for a given item. Must exactly match the request used to load the resource in the list.

The target and context will be provided by the preloader.

Parameters:
item - The model to load.