• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Delete of record

  • Thread starter Thread starter Android Question
  • Start date Start date
A

Android Question

Guest
how to delete, Update a record from list in android?
this is code to add a record.
public void add(View view){
//TODO get the text from EditTexts
// add the texts to the database
EditText Fname= (EditText) findViewById(R.id.text_firstname);
EditText Lname = (EditText) findViewById(R.id.text_lastname);
EditText Grade = (EditText) findViewById(R.id.text_grade);
db.open();
long id = db.insert(Fname.getText().toString(), Lname.getText().toString(), Grade.getText().toString());
//if{EditText Fname=Empty
//showMessage("Firstname is Empty","ID");
//}
showMessage("inserted Succesfully","ID:" +id);
Fname.setText("");
Lname.setText("");
Grade.setText("");

}
 
Back
Top Bottom