com.bumptech.glide
Class GifTypeRequest<ModelType>

java.lang.Object
  extended by com.bumptech.glide.GenericRequestBuilder<ModelType,InputStream,GifDrawable,GifDrawable>
      extended by com.bumptech.glide.GifRequestBuilder<ModelType>
          extended by com.bumptech.glide.GifTypeRequest<ModelType>
Type Parameters:
ModelType - The type of model to load the GifDrawable or other transcoded class from.

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.


Method Summary
 GenericRequestBuilder<ModelType,InputStream,GifDrawable,byte[]> toBytes()
          Setup the request to return the bytes of the loaded gif.
<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.
 
Methods inherited from class com.bumptech.glide.GifRequestBuilder
animate, animate, animate, cacheDecoder, centerCrop, crossFade, crossFade, crossFade, crossFade, decoder, diskCacheStrategy, dontAnimate, dontTransform, encoder, error, error, fitCenter, listener, override, placeholder, placeholder, priority, sizeMultiplier, skipMemoryCache, sourceEncoder, thumbnail, thumbnail, thumbnail, transcoder, transform, transformFrame, transformFrame
 
Methods inherited from class com.bumptech.glide.GenericRequestBuilder
into, into, into
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.