Skip to content

Commit

Permalink
Add support for injecting how the Bitmap is drawn via Drawable inject…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
koush committed Apr 26, 2015
1 parent 39ae77b commit 274ce68
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ion/src/com/koushikdutta/ion/BitmapDrawableFactory.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.koushikdutta.ion;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;

/**
* Created by koush on 4/25/15.
*/
public interface BitmapDrawableFactory {
public BitmapDrawableFactory DEFAULT = new BitmapDrawableFactory() {
@Override
public Drawable fromBitmap(Resources resources, Bitmap bitmap) {
return new BitmapDrawable(resources, bitmap);
}
};
Drawable fromBitmap(Resources resources, Bitmap bitmap);
}

0 comments on commit 274ce68

Please sign in to comment.