diff --git a/app/src/main/assets/about.html b/app/src/main/assets/about.html index c20e71c..1768d25 100644 --- a/app/src/main/assets/about.html +++ b/app/src/main/assets/about.html @@ -12,9 +12,10 @@ p.red { color: #ff2600; } + About -
+
Pilldroid © 2022 Jacques Foucry

Pilldroid est une gestion théorique de votre stock de médicaments.

diff --git a/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java b/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java index 5acf261..1f0785f 100644 --- a/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java @@ -11,8 +11,6 @@ import android.widget.ImageButton; import androidx.annotation.NonNull; -import com.journeyapps.barcodescanner.BarcodeCallback; -import com.journeyapps.barcodescanner.BarcodeResult; import com.journeyapps.barcodescanner.CaptureManager; import com.journeyapps.barcodescanner.DecoratedBarcodeView; import com.journeyapps.barcodescanner.ViewfinderView; diff --git a/app/src/main/java/net/foucry/pilldroid/DBHelper.java b/app/src/main/java/net/foucry/pilldroid/DBHelper.java index 073c29d..17dc45d 100644 --- a/app/src/main/java/net/foucry/pilldroid/DBHelper.java +++ b/app/src/main/java/net/foucry/pilldroid/DBHelper.java @@ -10,7 +10,6 @@ import android.text.format.DateUtils; import android.util.Log; import java.util.ArrayList; -import java.util.Comparator; import java.util.List; /** diff --git a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java index 6ca72eb..c3d681e 100644 --- a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java @@ -333,7 +333,6 @@ public class DrugListActivity extends AppCompatActivity { Log.d(TAG, "scanOptions == " + options); mBarcodeScannerLauncher.launch(options); - return; } /** @@ -351,8 +350,8 @@ public class DrugListActivity extends AppCompatActivity { Button ok = dialog.findViewById(R.id.agreed); Button cancel = dialog.findViewById(R.id.notagreed); ok.setEnabled(false); - ok.setBackground(getDrawable(R.drawable.rounded_btn_disabled)); - //TextView title = (TextView ) dialog.findViewById(R.id.title); + ok.setBackground(ContextCompat.getDrawable(this, R.drawable.rounded_btn_disabled)); + //TextView title = dialog.findViewById(R.id.title); final EditText editText= dialog.findViewById(R.id.editcip13); String cip13 = String.valueOf(editText.getText()); @@ -375,7 +374,7 @@ public class DrugListActivity extends AppCompatActivity { //alert.getButton(alert.BUTTON_POSITIVE).setEnabled(s.length() == 8); if (s.length() == 8) { ok.setEnabled(true); - ok.setBackground(getDrawable(R.drawable.rounded_btn)); + ok.setBackground(ContextCompat.getDrawable(editText.getContext(), R.drawable.rounded_btn)); } } }); @@ -423,7 +422,7 @@ public class DrugListActivity extends AppCompatActivity { msgString = aMedicine.getName() + " " + getString(R.string.msgFound); msg.setText(msgString); cplString = getString(R.string.addInList); - if (cplString.equals("")) { + if (cplString.isEmpty()) { cpl.setEnabled(false); } icon.setImageResource(R.drawable.tickmark); diff --git a/app/src/main/java/net/foucry/pilldroid/Utils.java b/app/src/main/java/net/foucry/pilldroid/Utils.java index 2abea0e..623b2df 100644 --- a/app/src/main/java/net/foucry/pilldroid/Utils.java +++ b/app/src/main/java/net/foucry/pilldroid/Utils.java @@ -3,7 +3,6 @@ package net.foucry.pilldroid; import net.foucry.pilldroid.models.Medicine; import net.foucry.pilldroid.models.Prescription; -import java.util.Comparator; import java.util.Date; import java.util.List; import java.util.Locale; diff --git a/app/src/main/java/net/foucry/pilldroid/WelcomeActivity.java b/app/src/main/java/net/foucry/pilldroid/WelcomeActivity.java index f6744d8..0f24363 100644 --- a/app/src/main/java/net/foucry/pilldroid/WelcomeActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/WelcomeActivity.java @@ -151,7 +151,7 @@ public class WelcomeActivity extends AppCompatActivity { msgString = getString(R.string.understood); msg.setText(msgString); - if (cplString.equals("")) { + if (cplString.isEmpty()) { cpl.setEnabled(false); } //icon.setImageResource(R.drawable.pilldroid_icon); diff --git a/app/src/main/res/layout/custom_barcode_scanner.xml b/app/src/main/res/layout/custom_barcode_scanner.xml index fbd1e5c..3063e77 100644 --- a/app/src/main/res/layout/custom_barcode_scanner.xml +++ b/app/src/main/res/layout/custom_barcode_scanner.xml @@ -8,7 +8,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" app:zxing_framing_rect_height="150dp" - app:zxing_framing_rect_width="300dp"> + app:zxing_framing_rect_width="300dp"/> + android:orientation="horizontal"/>