com.bumptech.glide
Class GifTypeRequest<ModelType>
java.lang.Object
com.bumptech.glide.GenericRequestBuilder<ModelType,InputStream,GifDrawable,GifDrawable>
com.bumptech.glide.GifRequestBuilder<ModelType>
com.bumptech.glide.GifTypeRequest<ModelType>
- Type Parameters:
ModelType
- The type of model to load the GifDrawable
or other
transcoded class from.
- All Implemented Interfaces:
- Cloneable
public class GifTypeRequest<ModelType>
- extends GifRequestBuilder<ModelType>
A class for creating a load request that either loads an GifDrawable
directly or that adds an ResourceTranscoder
to transcode
GifDrawable
into another resource type.
Methods inherited from class com.bumptech.glide.GifRequestBuilder |
animate, animate, animate, cacheDecoder, centerCrop, clone, crossFade, crossFade, crossFade, crossFade, decoder, diskCacheStrategy, dontAnimate, dontTransform, encoder, error, error, fallback, fallback, fitCenter, listener, load, override, placeholder, placeholder, priority, signature, sizeMultiplier, skipMemoryCache, sourceEncoder, thumbnail, thumbnail, thumbnail, transcoder, transform, transformFrame, transformFrame |
transcode
public <R> GenericRequestBuilder<ModelType,InputStream,GifDrawable,R> transcode(ResourceTranscoder<GifDrawable,R> transcoder,
Class<R> transcodeClass)
- Sets a transcoder to transcode the decoded
GifDrawable
into another
resource type.
- Type Parameters:
R
- The type of the resource the GifDrawable
will be
trasncoded to.- Parameters:
transcoder
- The transcoder to use.transcodeClass
- The Class
of the resource the
GifDrawable
will be transcoded to.
- Returns:
- This request builder.
toBytes
public GenericRequestBuilder<ModelType,InputStream,GifDrawable,byte[]> toBytes()
- Setup the request to return the bytes of the loaded gif.
Note - Any transformations added during this load do not change the underlying bytes and therefore this
will always load and provide the bytes of the original image before any transformations to the given target.
- Returns:
- A new Builder object to build a request to transform the given model into the bytes of an animated gif.