第十周总结
通过团队开发,学会了移动端的数据库的基本创建
public ArrayList<User> getAllData(){
ArrayList<User> list = new ArrayList<User>();
Cursor cursor = db.query("user",null,null,null,null,null,"name DESC");
while(cursor.moveToNext()){
String name = cursor.getString(cursor.getColumnIndex("name"));
String password = cursor.getString(cursor.getColumnIndex("password"));
list.add(new User(name,password));
}
return list;
}
}