com.xtremelabs.imageutils
Interface ImagePrecacheAssistant.PrecacheInformationProvider

Enclosing class:
ImagePrecacheAssistant

public static interface ImagePrecacheAssistant.PrecacheInformationProvider

This interface must be implemented in order for the ImagePrecacheAssistant to function.


Method Summary
 int getCount()
          This method must return the number of elements in the adapter.
 java.util.List<java.lang.String> onRowPrecacheRequestsForDiskCacheRequired(int position)
          This method returns a list of the URIs that are required for a particular position in the adapter.

If there are no image URIs available for the provided position, an empty list should be returned.
 java.util.List<ImagePrecacheAssistant.PrecacheRequest> onRowPrecacheRequestsForMemoryCacheRequired(int position)
           
 

Method Detail

getCount

int getCount()
This method must return the number of elements in the adapter. In most cases, it should return the same value as the BaseAdapter#getCount() method.

Returns:

onRowPrecacheRequestsForDiskCacheRequired

java.util.List<java.lang.String> onRowPrecacheRequestsForDiskCacheRequired(int position)
This method returns a list of the URIs that are required for a particular position in the adapter.

If there are no image URIs available for the provided position, an empty list should be returned.

Parameters:
position - The position for which images will be precached.
Returns:
A list of ImagePrecacheAssistant.PrecacheRequests. Each PrecacheRequest should contain a URI for a particular image and the bounds of the view the image will be loaded into. The bounds should be provided in pixels, or be given as null.

onRowPrecacheRequestsForMemoryCacheRequired

java.util.List<ImagePrecacheAssistant.PrecacheRequest> onRowPrecacheRequestsForMemoryCacheRequired(int position)