Merge branch 'bugfix/button_in_dialog' into develop

This commit is contained in:
jacques 2022-11-26 19:27:57 +01:00
commit 84e7e565e1
2 changed files with 4 additions and 2 deletions

View file

@ -349,14 +349,14 @@ public class DrugListActivity extends AppCompatActivity {
// setup a dialog window // setup a dialog window
alertDialogBuilder.setCancelable(false) alertDialogBuilder.setCancelable(false)
.setPositiveButton("OK", (dialog, id) -> { .setPositiveButton(R.string.button_ok, (dialog, id) -> {
//String cip13 = editText.getText().toString(); //String cip13 = editText.getText().toString();
String cip13 = "34009" + editText.getText().toString(); String cip13 = "34009" + editText.getText().toString();
MedicinesDAO medicineDAO = medicines.getMedicinesDAO(); MedicinesDAO medicineDAO = medicines.getMedicinesDAO();
Medicine aMedicine = medicineDAO.getMedicineByCIP13(cip13); Medicine aMedicine = medicineDAO.getMedicineByCIP13(cip13);
askToAddInDB(aMedicine); askToAddInDB(aMedicine);
}) })
.setNegativeButton("Cancel", .setNegativeButton(R.string.button_cancel,
(dialog, id) -> dialog.cancel()); (dialog, id) -> dialog.cancel());
// create an alert dialog // create an alert dialog

View file

@ -13,6 +13,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:text="@string/enter_cip_13" android:text="@string/enter_cip_13"
android:textStyle="bold"
android:textSize="24sp"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />