Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; public class Main { public static Drawable getDrawable(byte[] imgByte) { Bitmap bitmap; if (imgByte != null) { bitmap = BitmapFactory.decodeByteArray(imgByte, 0, imgByte.length); Drawable drawable = new BitmapDrawable(bitmap); return drawable; } return null; } }