ModelType - The type of model to use to load the BitmapDrawable or
GifDrawable.public class DrawableTypeRequest<ModelType> extends DrawableRequestBuilder<ModelType>
ResourceTranscoder to transcode the data into a
resource type other than a Drawable.context, glide, lifecycle, modelClass, requestTracker, transcodeClass| Modifier and Type | Method and Description |
|---|---|
BitmapTypeRequest<ModelType> |
asBitmap()
Attempts to always load the resource as a
Bitmap, even if it could actually be animated. |
GifTypeRequest<ModelType> |
asGif()
Attempts to always load the resource as a
GifDrawable. |
FutureTarget<File> |
downloadOnly(int width,
int height)
Loads the original unmodified data into the cache and returns a
Future that can be
used to retrieve the cache File containing the data. |
<Y extends Target<File>> |
downloadOnly(Y target)
Loads the original unmodified data into the cache and calls the given Target with the cache File.
|
animate, animate, animate, bitmapTransform, cacheDecoder, centerCrop, clone, crossFade, crossFade, crossFade, crossFade, decoder, diskCacheStrategy, dontAnimate, dontTransform, encoder, error, error, fallback, fallback, fitCenter, into, listener, load, override, placeholder, placeholder, priority, signature, sizeMultiplier, skipMemoryCache, sourceEncoder, thumbnail, thumbnail, thumbnail, transcoder, transform, transforminto, into, preload, preloadpublic BitmapTypeRequest<ModelType> asBitmap()
Bitmap, even if it could actually be animated.Bitmappublic GifTypeRequest<ModelType> asGif()
GifDrawable.
If the underlying data is not a GIF, this will fail. As a result, this should only be used if the model
represents an animated GIF and the caller wants to interact with the GIfDrawable directly. Normally using
just an DrawableTypeRequest is sufficient because it will determine whether or
not the given data represents an animated GIF and return the appropriate animated or not animated
Drawable automatically.
GifDrawable.public <Y extends Target<File>> Y downloadOnly(Y target)
Y - The type of Target.target - The Target that will receive the cache File when the load completespublic FutureTarget<File> downloadOnly(int width, int height)
Future that can be
used to retrieve the cache File containing the data.width - The width in pixels to use to fetch the data.height - The height in pixels to use to fetch the data.Future that can be used to retrieve the cache File containing the data.