最新文章列表

常用的getResources()系列

  以例子形式说明如何提取资源文件设置view或sting: private Context ctx; TextView mText = (TextView)findViewById(R.id.text); ImageView mImage = (ImageView)findViewById(R.id.image); TextView[] mTextViews; String[ ...
luly20002003 评论(0) 有2250人浏览 2013-04-20 15:32

把string类型的R.drawable.xx转换去int类型的方法

不罗嗦上代码 String sImage = "xxx.png"; int image = this.getResources().getIdentifier(sImage.substring(0, sImage.length()-4), "drawable", getPackageName());
lxmgfd 评论(0) 有1299人浏览 2012-02-07 16:53

最近博客热门TAG

Java(141741) C(73643) C++(68602) SQL(64557) C#(59604) XML(59131) HTML(59042) JavaScript(54917) .net(54782) Web(54511) 工作(54116) Linux(50906) Oracle(49861) 应用服务器(43285) Spring(40811) 编程(39452) Windows(39380) JSP(37540) MySQL(37267) 数据结构(36420)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics