Android examples for App:Resource
get Res Id By Name from resource
//package com.java2s; import android.content.Context; public class Main { public static int getResIdByName(Context context, String name) { return context.getResources().getIdentifier(name, "id", context.getPackageName()); }/*w ww .ja v a 2 s . c om*/ }