Java tutorial
//package com.java2s; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap getBitmapFromResources(Context context, int id) { Bitmap bmp = null; Resources res = context.getResources(); bmp = BitmapFactory.decodeResource(res, id); return bmp; } }