Java tutorial
//package com.java2s; /** * @copyright Urucas * @license Copyright (C) 2013. All rights reserved * @version Release: 1.0.0 * @link http://urucas.com * @developers Bruno Alassia, Pamela Prosperi */ import android.content.Context; public class Main { public static String stringFromResource(Context context, String name) { int id = context.getResources().getIdentifier(name, "string", context.getPackageName()); return context.getResources().getString(id); } }