Default behavior - Geisonszo/TecProg-Emergo GitHub Wiki

Example:

if (result.getCount() == DATABASEEMPTY) {

  disableOptionsButSave(saveFirstContact,updateFirstContact,deleteFirstContact);

  Log.e("Database is Empty.","");
} else {

  if (result.moveToFirst() == true) {

    nameFirstContact.setText(result.getString(NAMEONDATABASE));
    phoneFirstContact.setText(result.getString(PHONEONDATABASE));
    disableField(saveFirstContact,nameFirstContact,phoneFirstContact);

    Log.e("Database not is empty","In database have at least an emergency contact");
  } else {

    // Nothing to do.
  }
}