Code example for BitmapDrawable

Methods: getBitmap

    public void draw(Canvas canvas) {
        Paint paint = new Paint();
        canvas.drawBitmap(realBitmapDrawable.getBitmap(), 0, 0, paint);
    public void setColorFilter( colorFilter) {
        this.colorFilter = colorFilter;
    public getBitmap() {
        return bitmap;
     * Non-Android accessor that tells you the resource id that this {@code BitmapDrawable} was loaded from. This lets 
     * your tests assert that the bitmap is correct without having to actually load the bitmap.