2013年6月15日

摘要: 没什么好说的,注意bindView和newView就行。 1 public class MySimpleCursorAdapter extends CursorAdapter { 2 private LayoutInflater mInflater; 3 4 public MySimpleCursorAdapter(Context context, Cursor c) { 5 super(context, c, false); 6 mInflater = LayoutInflater.from(context); 7 } 8 9 ... 阅读全文
posted @ 2013-06-15 20:27 feiyunruyue 阅读(574) 评论(0) 推荐(0) 编辑
摘要: 今天看了下Android 的ArrayAdapter源代码,它继承了BaseAdapter,代码加上注释有500多行。于是,我精简了下,自己写个了最简单的供大家理解。 1 public class MyArrayAdapter<T> extends BaseAdapter { 2 private List<T> mObjects; 3 private int mResource; 4 private LayoutInflater mInflater; 5 6 public MyArrayAdapter(Context context, int layout... 阅读全文
posted @ 2013-06-15 00:03 feiyunruyue 阅读(171) 评论(0) 推荐(0) 编辑

导航