T- The type of data that will be loaded from the
public class UrlLoader<T> extends Object implements ModelLoader<URL,T>
GlideUrlobjects and then uses the wrapped
GlideUrls to load the data.
|Constructor and Description|
|Modifier and Type||Method and Description|
public UrlLoader(ModelLoader<GlideUrl,T> glideUrlLoader)
public DataFetcher<T> getResourceFetcher(URL model, int width, int height)
DataFetcherthat can fetch the data required to decode the resource represented by this model. The
DataFetcherwill not be used if the resource is already cached.
Note - If no valid data fetcher can be returned (for example if a model has a null URL), then it is acceptable to return a null data fetcher from this method. Doing so will be treated any other failure or exception during the load process.
model- The model representing the resource.
width- The width in pixels of the view or target the resource will be loaded into, or
Target.SIZE_ORIGINALto indicate that the resource should be loaded at its original width.
height- The height in pixels of the view or target the resource will be loaded into, or
Target.SIZE_ORIGINALto indicate that the resource should be loaded at its original height.
DataFetcherthat can obtain the data the resource can be decoded from if the resource is not cached, or null if no valid
DataFetchercould be constructed.