BaseAdapter可以实现自定义的丰富子项视图,本文实现如下所示结果:
实现代码:
1 /* 2 ListView :列表 3 4 BaseAdapter 通用的基础适配器 5 6 7 8 * 9 * */ 10 public class BaseAdapter_test extends Activity { 11 12 13 private ListView listview; 14 private int[] images=new int[]{ 15 R.drawable.s1, 16 R.drawable.s2, 17 R.drawable.s3, 18 R.drawable.s4, 19 R.drawable.s5}; 20 21 private BaseAdapter adapter; 22 private Context context; 23 private List
baseadapate.xml
items.xml
1 2 9 10 16 17 26 27 28 35