Java tutorial
//package com.java2s; import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; public class Main { public static BitmapDrawable toDrawable(Context context, Bitmap bmp) { BitmapDrawable bd = new BitmapDrawable(context.getResources(), bmp); return bd; } }