摘要:
方法一:1try{2Field field=R.drawable.class.getField("icon");3inti= field.getInt(newR.drawable());4Log.d("icon",i+"");5}catch(Exception e){6Log.e("icon",e.toString());7}[代码]方法二:1Resources res=getResources();2inti=res.getIdentifier("icon","drawable&qu 阅读全文