-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for injecting how the Bitmap is drawn via Drawable inject…
…ion.
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |