摘要: 使用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);}第一个参数格式是:包名 + : +资源文件夹名 + / +资源名;是这种格式然后其他的可 阅读全文
posted @ 2013-11-29 13:38 似水流云 阅读(421) 评论(0) 推荐(0) 编辑