Code example for BitmapDrawable

0
    } 
 
    @Override 
    protected void onImageLoadedSuccess(Bitmap bitmap) {
        Bitmap processedBitmap = processBitmap(bitmap);
        Drawable drawable = new BitmapDrawable(processedBitmap);
        setCompoundDrawable(drawable);
    } 
 
    @Override 
    public void setDummyDrawableForView(Drawable dummyDrawable) {
        setCompoundDrawable(dummyDrawable);
    } 
 
    @Override 
    public TextView getView() {
        return (TextView) view;
    } 
 
    private void setCompoundDrawable(Drawable drawable) {
        DisplayMetrics metrics = new DisplayMetrics();