你要定义一个实体类,比如Person这个类。数组中存放的是person对象。你查找出多个对象都放进这个数组。ArrayList
data.clear();
while (cursor.moveToNext()) {
Person person = new Person();
将每个字段set()进person的每个字段
data.add(person);// 把一个对象放入数组中
}
最后你就用这个data数组放进ListView里显示就行了
思路就这样,试试看,不难
while循环里就读取游标里的记录了
while (cursor.moveToNext()) {
把你的数据存到HashMap或者List里面去
}
cursor.close();