From 1e44a786a619c25d9fb0d6a03d549f5556e55c46 Mon Sep 17 00:00:00 2001 From: jacques Date: Sat, 26 Nov 2022 19:26:37 +0100 Subject: [PATCH 1/2] Use the text ressource --- app/src/main/java/net/foucry/pilldroid/DrugListActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java index 2650c94..3a8428b 100644 --- a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java @@ -349,14 +349,14 @@ public class DrugListActivity extends AppCompatActivity { // setup a dialog window alertDialogBuilder.setCancelable(false) - .setPositiveButton("OK", (dialog, id) -> { + .setPositiveButton(R.string.button_ok, (dialog, id) -> { //String cip13 = editText.getText().toString(); String cip13 = "34009" + editText.getText().toString(); MedicinesDAO medicineDAO = medicines.getMedicinesDAO(); Medicine aMedicine = medicineDAO.getMedicineByCIP13(cip13); askToAddInDB(aMedicine); }) - .setNegativeButton("Cancel", + .setNegativeButton(R.string.button_cancel, (dialog, id) -> dialog.cancel()); // create an alert dialog From 8f8cc232ff88cb3be11a03696ee8efedc9ec682e Mon Sep 17 00:00:00 2001 From: jacques Date: Sat, 26 Nov 2022 19:27:32 +0100 Subject: [PATCH 2/2] Chnage title font arguments --- app/src/main/res/layout/input_dialog.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/layout/input_dialog.xml b/app/src/main/res/layout/input_dialog.xml index 7346d73..de95a58 100644 --- a/app/src/main/res/layout/input_dialog.xml +++ b/app/src/main/res/layout/input_dialog.xml @@ -13,6 +13,8 @@ android:layout_height="wrap_content" android:layout_marginStart="16dp" android:text="@string/enter_cip_13" + android:textStyle="bold" + android:textSize="24sp" android:textAppearance="?android:attr/textAppearanceMedium" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" />