ListView是一种常见的布局,通过SimpleAdapter加载数据既省力又美观,常用做法如下:
SimpleAdapter mySimpleAdapter = new SimpleAdapter (
Context context,
List<? extends Map<String, ?>> data,
int resource,
String[] from,
int[] to)
myListview.setAdapter(mySimpleAdapter)