
android高手进阶
JAVA服务端研发知识图谱
不忘初心 方得始终
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
android findviewbyId 简化写法
在android开发中在oncreate的方法中经常要findViewById 来查找布局中的元素,这里我们可以简化写法如下: /** * 通过泛型来简化findViewById * * @param id * @param * @return */ protected final E getView(int id) {原创 2016-02-16 14:43:56 · 945 阅读 · 0 评论 -
android singleton 泛型模式的单例
public abstract class Singleton { private T mInstance; protected abstract T create(); public T get() { synchronized (this) { if (this.mInstance == null) { this.mInstance =原创 2016-03-09 10:15:18 · 858 阅读 · 0 评论