BitmapDrawable

Class of android.graphics.drawable · BitmapDrawable.java · Android's reference

public class BitmapDrawable extends Drawable

BitmapDrawable ← Drawable

A bitmap drawn into the bounds.

Constructors

public BitmapDrawable(android.content.res.Resources res, Bitmap bitmap) source
public BitmapDrawable(Bitmap bitmap) source

Methods

public void inflate(android.content.res.Resources r, org.xmlpull.v1.XmlPullParser parser, android.util.AttributeSet attrs, android.content.res.Resources.Theme theme) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException source

a <bitmap>: the image of its source, where its gravity puts it, or tiled

public final Bitmap getBitmap() source
public final Paint getPaint() source
public int getGravity() source
public void setGravity(int gravity) source
public Shader.TileMode getTileModeX() source
public Shader.TileMode getTileModeY() source
public void setTileModeX(Shader.TileMode mode) source
public final void setTileModeY(Shader.TileMode mode) source
public void setTileModeXY(Shader.TileMode xmode, Shader.TileMode ymode) source
public void draw(Canvas canvas) source

A tiled bitmap fills the bounds from their corner; otherwise the bitmap goes where its gravity puts it.

public void setAlpha(int alpha) source
public int getAlpha() source
public void setColorFilter(ColorFilter colorFilter) source
public int getOpacity() source
public int getIntrinsicWidth() source
public int getIntrinsicHeight() source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.