Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String createTable= "CREATE TABLE " + TABLE_Name+"("
- + KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + KEY_NAME + " TEXT,"
- + ")";
- db.execSQL(createTable);
- ///////////////////
- database.execSQL("INSERT INTO custom_timer_session VALUES(1,'Tabata','tota')");
- database.execSQL("INSERT INTO custom_timer VALUES(1,'WORK','salwa')");
- database.execSQL("INSERT INTO custom_timer VALUES(2,'REST','gain')");
- private void createNote(String note) {
- // inserting note in db and getting
- // newly inserted note id
- long id = db.insertNote(note);
- // get the newly inserted note from db
- Note n = db.getNote(id);
- if (n != null) {
- // adding new note to array list at 0 position
- notesList.add(0, n);
- // refreshing the list
- mAdapter.notifyDataSetChanged();
- toggleEmptyNotes();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement