Java tutorial
//package com.java2s; import android.content.Context; import android.graphics.drawable.Drawable; public class Main { public static Drawable getDrawable(Context context, int drawableId) { return context.getResources().getDrawable(drawableId); } }