第十周总结

通过团队开发,学会了移动端的数据库的基本创建

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;
}
}
posted @ 2020-04-21 14:23  wumingxiaozu  阅读(116)  评论(0编辑  收藏  举报