资源的ID 值 方法一:
try{
Field field=R.drawable.class.getField("icon");
int i= field.getInt(new R.drawable());
Log.d("icon",i+"");
}catch(Exception e){
Log.e("icon",e.toString());
}
资源的ID 值 方法二:
Resources res=getResources();
int i=res.getIdentifier("icon","drawable",getPackageName());
Log.i("res",Integer.toString(i));
文字资源:
String str = getString(R.string.btnSetDate).toString();