mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-13 00:51:35 +01:00
fix aligment; fix bug in dialog result
This commit is contained in:
parent
21d8cce250
commit
09342383bb
1 changed files with 19 additions and 4 deletions
|
@ -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) {
|
||||
|
||||
}
|
||||
});
|
||||
*/
|
Loading…
Reference in a new issue