fix aligment; fix bug in dialog result

This commit is contained in:
jacques 2020-07-07 21:38:43 +02:00
parent 21d8cce250
commit 09342383bb

View file

@ -323,7 +323,7 @@ public class MedicamentListActivity extends AppCompatActivity {
// Get Medoc from database
final Medicament scannedMedoc = dbMedoc.getMedocByCIP13(cip13);
askToAddInDB(scannedMedoc);
askToAddInDB(scannedMedoc);
}
}
}
@ -340,9 +340,9 @@ public class MedicamentListActivity extends AppCompatActivity {
alertDialogBuilder.setCancelable(false)
.setPositiveButton("OK", (dialog, id) -> {
String cip13 = editText.getText().toString();
Medicament med = dbMedoc.getMedocByCIP13(cip13);
askToAddInDB(med);
addMedToList(med);
askToAddInDB(med);
})
.setNegativeButton("Cancel",
(dialog, id) -> dialog.cancel());
@ -543,4 +543,19 @@ public class MedicamentListActivity extends AppCompatActivity {
}
}
}
}
}
/*
editText.addTextChangeListener( new TextWatcher() {
@Override
void afterTextChanged(Editable s){
}
void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
void onTextChanged(CharSequence s, int start, int before, int count) {
}
});
*/