com.bumptech.glide.load.resource.bitmap
Class GlideBitmapDrawable

java.lang.Object
  extended by android.graphics.drawable.Drawable
      extended by com.bumptech.glide.load.resource.drawable.GlideDrawable
          extended by com.bumptech.glide.load.resource.bitmap.GlideBitmapDrawable
All Implemented Interfaces:
Animatable

public class GlideBitmapDrawable
extends GlideDrawable

A static GlideDrawable for displaying a single image.


Nested Class Summary
 
Nested classes/interfaces inherited from class android.graphics.drawable.Drawable
Drawable.Callback, Drawable.ConstantState
 
Field Summary
 
Fields inherited from class com.bumptech.glide.load.resource.drawable.GlideDrawable
LOOP_FOREVER, LOOP_INTRINSIC
 
Constructor Summary
GlideBitmapDrawable(Resources res, Bitmap bitmap)
           
 
Method Summary
 void draw(Canvas canvas)
           
 Bitmap getBitmap()
           
 Drawable.ConstantState getConstantState()
           
 int getIntrinsicHeight()
           
 int getIntrinsicWidth()
           
 int getOpacity()
           
 boolean isAnimated()
          Returns true if this drawable is animated.
 boolean isRunning()
           
 Drawable mutate()
           
protected  void onBoundsChange(Rect bounds)
           
 void setAlpha(int alpha)
           
 void setColorFilter(ColorFilter colorFilter)
           
 void setLoopCount(int loopCount)
          Sets the number of times the animation should loop.
 void start()
           
 void stop()
           
 
Methods inherited from class android.graphics.drawable.Drawable
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, getAlpha, getBounds, getCallback, getChangingConfigurations, getCurrent, getLevel, getMinimumHeight, getMinimumWidth, getPadding, getState, getTransparentRegion, inflate, invalidateSelf, isAutoMirrored, isStateful, isVisible, jumpToCurrentState, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, 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
 

Constructor Detail

GlideBitmapDrawable

public GlideBitmapDrawable(Resources res,
                           Bitmap bitmap)
Method Detail

getIntrinsicWidth

public int getIntrinsicWidth()
Overrides:
getIntrinsicWidth in class Drawable

getIntrinsicHeight

public int getIntrinsicHeight()
Overrides:
getIntrinsicHeight in class Drawable

isAnimated

public boolean isAnimated()
Description copied from class: GlideDrawable
Returns true if this drawable is animated.

Specified by:
isAnimated in class GlideDrawable

setLoopCount

public void setLoopCount(int loopCount)
Description copied from class: GlideDrawable
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.

Specified by:
setLoopCount in class GlideDrawable

start

public void start()

stop

public void stop()

isRunning

public boolean isRunning()

onBoundsChange

protected void onBoundsChange(Rect bounds)
Overrides:
onBoundsChange in class Drawable

getConstantState

public Drawable.ConstantState getConstantState()
Overrides:
getConstantState in class Drawable

draw

public void draw(Canvas canvas)
Specified by:
draw in class Drawable

setAlpha

public void setAlpha(int alpha)
Specified by:
setAlpha in class Drawable

setColorFilter

public void setColorFilter(ColorFilter colorFilter)
Specified by:
setColorFilter in class Drawable

getOpacity

public int getOpacity()
Specified by:
getOpacity in class Drawable

mutate

public Drawable mutate()
Overrides:
mutate in class Drawable

getBitmap

public Bitmap getBitmap()