Java tutorial
//package com.java2s; import android.content.Context; public class Main { static public int getIntResource(Context c, int id) { return (Integer) c.getResources().getInteger(id); } }