Пример #1
0
 public void createExerciseDetailCategory(long exerciseDetailId, Category category) {
   SQLiteDatabase db = this.getWritableDatabase();
   ContentValues values = new ContentValues();
   values.put(TABLE_EXERCISE_DETAIL + KEY_ID, exerciseDetailId);
   values.put(TABLE_EXERCISE_CATEGORY + KEY_NAME, category.name());
   db.insert(TABLE_EXERCISE_DETAIL_CATEGORY, null, values);
 }
Пример #2
0
  public void populateExerciseCategory(SQLiteDatabase db) {
    ContentValues values;

    for (Category category : Category.values()) {
      values = new ContentValues();
      values.put(KEY_NAME, category.name());
      db.insert(TABLE_EXERCISE_CATEGORY, null, values);
    }
  }