Java tutorial
//package com.java2s; import android.app.Activity; import android.content.res.Resources; public class Main { private static String createFromResource(final Activity activity, final int id) { final Resources resources = activity.getResources(); return resources.getString(id); } }