字符串文件名获取id整型值
Class<drawable> cls = R.drawable.class;
try {
Integer value = cls.getDeclaredField("aa").getInt(null);
Log.v("value",value.toString());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Class<drawable> cls = R.drawable.class;
try {
Integer value = cls.getDeclaredField("aa").getInt(null);
Log.v("value",value.toString());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}