03 2015 档案

摘要:xml中的textView: 1 如程序中所见我在xml中设置了 DrawableLeft。我想在代码中改变drawable。有什么方法可以使用代码为textview设置drawableLeft呢?解决方案:1 public void setCompoundDrawables (Drawable l... 阅读全文
posted @ 2015-03-24 16:57 jerrys 阅读(120) 评论(0) 推荐(0)
摘要:如何简便的遍历Map你是否已经对每次从Map中取得关键字然后再取得相应的值感觉厌倦?使用JDK5的增强for循环,来遍历Map,简单多了,比Map.Entry还方便。看代码:for (String key : map.keySet()) { System.out.println(key +... 阅读全文
posted @ 2015-03-09 16:30 jerrys 阅读(423) 评论(0) 推荐(0)