mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
Merge branch 'bugfix/button_in_dialog' into develop
This commit is contained in:
commit
84e7e565e1
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
|
|
|
@ -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" />
|
||||||
|
|
Loading…
Reference in a new issue