示例#1
0
 /** 初始化书列表 */
 private void initBookList() {
   bookList.clear();
   Cursor cursor = DBHelper.getAllCursor(db, "book_list");
   while (cursor.moveToNext()) {
     String bookname = cursor.getString(cursor.getColumnIndex("bookname"));
     File file = new File(bookname);
     bookList.add(file);
   }
 }
示例#2
0
 public void openDb() {
   if (db == null || !db.isOpen()) {
     db = DBHelper.openDb(this);
   }
 }