please help me to find solutions.I have 2 Activity A and B.Data come from B through OnActivityResult method,saving in DataBase and shown in the ListView.I need to update data with OnItemClick method.But problem is how to do that.I know one way,to create a new Activity with EditText,but I think its not correct.What else can I use? I have this method in DB:
public boolean updateRow(long rowId, String task, String date,String grup){
String where = KEY_ROWID + "=" + rowId;
ContentValues newValues = new ContentValues();
newValues.put(KEY_TASK, task);
newValues.put(KEY_DATE, date);
newValues.put(KEY_GRUPS, grup);
// Insert it into the database.
return db.update(DATABASE_TABLE, newValues, where, null) != 0;
}
Aucun commentaire:
Enregistrer un commentaire