示例#1
0
  public void addNewWorkout(
      String workoutName, int onTime, int offTime, List<String> exercises, boolean trackStatus) {
    ContentValues cv = new ContentValues();

    cv.put(DbCommon.KEY_WORKOUTNAME, workoutName);
    cv.put(DbCommon.KEY_ONTIME, onTime);
    cv.put(DbCommon.KEY_OFFTIME, offTime);
    cv.put(DbCommon.KEY_EXERCISES, Helper.createJSONStringList(exercises));
    cv.put(DbCommon.KEY_TRACK_STATUS, Helper.booleanToInt(trackStatus));
    database.insert(DbCommon.TABLE_LIST, null, cv);
  }
示例#2
0
 public void updateTrackStatus(long l, boolean trackStatus) {
   ContentValues cv = new ContentValues();
   cv.put(DbCommon.KEY_TRACK_STATUS, Helper.booleanToInt(trackStatus));
   database.update(DbCommon.TABLE_LIST, cv, DbCommon.KEY_LIST_ROWID + "=" + l, null);
 }