com.bumptech.glide.load.resource.drawable
Class GlideDrawable

java.lang.Object
  extended by android.graphics.drawable.Drawable
      extended by com.bumptech.glide.load.resource.drawable.GlideDrawable
All Implemented Interfaces:
Animatable
Direct Known Subclasses:
GifDrawable, GlideBitmapDrawable, SquaringDrawable

public abstract class GlideDrawable
extends Drawable
implements Animatable

A base class for drawables that are either static equivalents of BitmapDrawable or that contain an animation.


Nested Class Summary
 
Nested classes/interfaces inherited from class android.graphics.drawable.Drawable
Drawable.Callback, Drawable.ConstantState
 
Field Summary
static int LOOP_FOREVER
          A constant indicating that an animated drawable should loop continuously.
static int LOOP_INTRINSIC
          A constant indicating that an animated drawable should loop for its default number of times.
 
Constructor Summary
GlideDrawable()
           
 
Method Summary
abstract  boolean isAnimated()
          Returns true if this drawable is animated.
abstract  void setLoopCount(int loopCount)
          Sets the number of times the animation should loop.
 
Methods inherited from class android.graphics.drawable.Drawable
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, draw, getAlpha, getBounds, getCallback, getChangingConfigurations, getConstantState, getCurrent, getIntrinsicHeight, getIntrinsicWidth, getLevel, getMinimumHeight, getMinimumWidth, getOpacity, getPadding, getState, getTransparentRegion, inflate, invalidateSelf, isAutoMirrored, isStateful, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setAlpha, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setColorFilter, setDither, setFilterBitmap, setLevel, setState, setVisible, unscheduleSelf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface android.graphics.drawable.Animatable
isRunning, start, stop
 

Field Detail

LOOP_FOREVER

public static final int LOOP_FOREVER
A constant indicating that an animated drawable should loop continuously.

See Also:
Constant Field Values

LOOP_INTRINSIC

public static final int LOOP_INTRINSIC
A constant indicating that an animated drawable should loop for its default number of times. For animated GIFs, this constant indicates the GIF should use the netscape loop count if present.

See Also:
Constant Field Values
Constructor Detail

GlideDrawable

public GlideDrawable()
Method Detail

isAnimated

public abstract boolean isAnimated()
Returns true if this drawable is animated.


setLoopCount

public abstract void setLoopCount(int loopCount)
Sets the number of times the animation should loop. This method will only have an affect if ()} returns true. A loop count of <=0 indicates loop forever.