Example usage for android.graphics.drawable BitmapDrawable BitmapDrawable

List of usage examples for android.graphics.drawable BitmapDrawable BitmapDrawable

Introduction

In this page you can find the example usage for android.graphics.drawable BitmapDrawable BitmapDrawable.

Prototype

private BitmapDrawable(BitmapState state, Resources res) 

Source Link

Usage

From source file:Main.java

public static Drawable bitmapToDrawable(Bitmap bitmap) {
    Drawable drawable = new BitmapDrawable(null, bitmap);
    return drawable;
}

From source file:Main.java

public static BitmapDrawable toDrawable(Context context, Bitmap bmp) {
    BitmapDrawable bd = new BitmapDrawable(context.getResources(), bmp);
    return bd;
}

From source file:Main.java

public static Drawable parseBitmap2Drawable(Context context, Bitmap bitmap) {
    return new BitmapDrawable(context.getResources(), bitmap);
}

From source file:Main.java

public static Drawable Bitmap2Drawable(Context context, Bitmap bitmap) {
    return new BitmapDrawable(context.getResources(), bitmap);
}

From source file:Main.java

public static Drawable bitmapToDrawable(Resources res, Bitmap bitmap) {
    return new BitmapDrawable(res, bitmap);
}

From source file:Main.java

public static Drawable bitmapToIcon(final Bitmap bitmap) {
    final Drawable d = new BitmapDrawable(Resources.getSystem(), bitmap);
    return d;//from   ww  w .  j  a  va2  s.  c o m
}

From source file:Main.java

public static Drawable getDrawableFromBitmap(Context context, Bitmap bitmap) {
    return new BitmapDrawable(context.getResources(), bitmap);
}

From source file:Main.java

public static Drawable bitmapToDrawable(Bitmap bitmap, Context context) {
    BitmapDrawable bd = new BitmapDrawable(context.getResources(), bitmap);
    return (Drawable) bd;
}

From source file:Main.java

public static Drawable bitmap2Drawable(Context c, final Bitmap bitmap) {
    BitmapDrawable bd = new BitmapDrawable(c.getResources(), bitmap);
    return bd;//from w w w .  j a  v  a  2  s.  c  o m
}

From source file:Main.java

public static Drawable bitmapToDrawable(Context context, Bitmap bitmap) {
    BitmapDrawable bd = new BitmapDrawable(context.getResources(), bitmap);
    Drawable drawable = (Drawable) bd;/*  w  ww .ja  va 2  s.c o  m*/
    return drawable;
}