摘要:
使用getIdentifier()方法可以方便的获各应用包下的指定资源ID。主要有两种方法:(1)方式一Resources resources = context.getResources();int indentify = resources.getIdentifier(org.loveandroid.androidtest:drawable/icon",null,null);if(indentify>0){icon = resources.getDrawable(indentify);}第一个参数格式是:包名 + : +资源文件夹名 + / +资源名;是这种格式然后其他的可 阅读全文