最新文章列表

常用的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) 有2206人浏览 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) 有1269人浏览 2012-02-07 16:53

最近博客热门TAG

Java(141747) C(73651) C++(68608) SQL(64571) C#(59609) XML(59133) HTML(59043) JavaScript(54918) .net(54785) Web(54513) 工作(54116) Linux(50906) Oracle(49876) 应用服务器(43288) Spring(40812) 编程(39454) Windows(39381) JSP(37542) MySQL(37268) 数据结构(36423)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics