Android examples for App:Resource
This method is used to get a String resources by name
//package com.java2s; import android.content.Context; public class Main { /**//ww w. j ava2 s. c o m * This method is used to get a String resources by name * * @param pContext * application context * @param pName * resource name * @return */ public static int getStringRessourceByName(final Context pContext, final String pName) { return pContext.getResources().getIdentifier(pName, "string", pContext.getPackageName()); } }