android学习摘记——如何将Cursor得到的数据绑定到ArrayList上面
时间:2011-06-15 来源:流光映雪
声明ArrayList
private ArrayList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();
绑定数据
while(cursor.moveToNext()) {
HashMap<String, String> map = new HashMap<String, String>();
map.put("code", cursor.getString(1));
map.put("currency", cursor.getString(2));
map.put("parities", cursor.getString(3));
list.add(map);
}
相关阅读 更多 +