android.graphics.drawable
Class BitmapDrawable

java.lang.Object
  extended by android.graphics.drawable.Drawable
      extended by android.graphics.drawable.BitmapDrawable

public class BitmapDrawable
extends Drawable


Nested Class Summary
 
Nested classes/interfaces inherited from class android.graphics.drawable.Drawable
Drawable.Callback, Drawable.ConstantState
 
Constructor Summary
BitmapDrawable()
           
BitmapDrawable(Bitmap bitmap)
           
BitmapDrawable(InputStream is)
           
BitmapDrawable(Resources res)
           
BitmapDrawable(Resources res, Bitmap bitmap)
           
BitmapDrawable(Resources res, InputStream is)
           
BitmapDrawable(Resources res, String filepath)
           
BitmapDrawable(String filepath)
           
 
Method Summary
 void draw(Canvas canvas)
           
 Bitmap getBitmap()
           
 int getChangingConfigurations()
           
 Drawable.ConstantState getConstantState()
           
 int getGravity()
           
 int getIntrinsicHeight()
           
 int getIntrinsicWidth()
           
 int getOpacity()
           
 Paint getPaint()
           
 Shader.TileMode getTileModeX()
           
 Shader.TileMode getTileModeY()
           
 void inflate(Resources r, org.xmlpull.v1.XmlPullParser parser, AttributeSet attrs)
           
 Drawable mutate()
           
protected  void onBoundsChange(Rect bounds)
           
 void setAlpha(int alpha)
           
 void setAntiAlias(boolean aa)
           
 void setColorFilter(ColorFilter cf)
           
 void setDither(boolean dither)
           
 void setFilterBitmap(boolean filter)
           
 void setGravity(int gravity)
           
 void setTargetDensity(Canvas canvas)
           
 void setTargetDensity(DisplayMetrics metrics)
           
 void setTargetDensity(int density)
           
 void setTileModeX(Shader.TileMode mode)
           
 void setTileModeXY(Shader.TileMode xmode, Shader.TileMode ymode)
           
 void setTileModeY(Shader.TileMode mode)
           
 
Methods inherited from class android.graphics.drawable.Drawable
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, getBounds, getCallback, getCurrent, getLevel, getMinimumHeight, getMinimumWidth, getPadding, getState, getTransparentRegion, invalidateSelf, isStateful, isVisible, jumpToCurrentState, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setLevel, setState, setVisible, unscheduleSelf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitmapDrawable

public BitmapDrawable()

BitmapDrawable

public BitmapDrawable(Resources res)

BitmapDrawable

public BitmapDrawable(Bitmap bitmap)

BitmapDrawable

public BitmapDrawable(Resources res,
                      Bitmap bitmap)

BitmapDrawable

public BitmapDrawable(String filepath)

BitmapDrawable

public BitmapDrawable(Resources res,
                      String filepath)

BitmapDrawable

public BitmapDrawable(InputStream is)

BitmapDrawable

public BitmapDrawable(Resources res,
                      InputStream is)
Method Detail

getPaint

public final Paint getPaint()

getBitmap

public final Bitmap getBitmap()

setTargetDensity

public void setTargetDensity(Canvas canvas)

setTargetDensity

public void setTargetDensity(DisplayMetrics metrics)

setTargetDensity

public void setTargetDensity(int density)

getGravity

public int getGravity()

setGravity

public void setGravity(int gravity)

setAntiAlias

public void setAntiAlias(boolean aa)

setFilterBitmap

public void setFilterBitmap(boolean filter)
Overrides:
setFilterBitmap in class Drawable

setDither

public void setDither(boolean dither)
Overrides:
setDither in class Drawable

getTileModeX

public Shader.TileMode getTileModeX()

getTileModeY

public Shader.TileMode getTileModeY()

setTileModeX

public void setTileModeX(Shader.TileMode mode)

setTileModeY

public final void setTileModeY(Shader.TileMode mode)

setTileModeXY

public void setTileModeXY(Shader.TileMode xmode,
                          Shader.TileMode ymode)

getChangingConfigurations

public int getChangingConfigurations()
Overrides:
getChangingConfigurations in class Drawable

onBoundsChange

protected void onBoundsChange(Rect bounds)
Overrides:
onBoundsChange 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 cf)
Specified by:
setColorFilter in class Drawable

mutate

public Drawable mutate()
Overrides:
mutate in class Drawable

inflate

public void inflate(Resources r,
                    org.xmlpull.v1.XmlPullParser parser,
                    AttributeSet attrs)
             throws org.xmlpull.v1.XmlPullParserException,
                    IOException
Overrides:
inflate in class Drawable
Throws:
org.xmlpull.v1.XmlPullParserException
IOException

getIntrinsicWidth

public int getIntrinsicWidth()
Overrides:
getIntrinsicWidth in class Drawable

getIntrinsicHeight

public int getIntrinsicHeight()
Overrides:
getIntrinsicHeight in class Drawable

getOpacity

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

getConstantState

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


Copyright © 2008-2012. All Rights Reserved.