diff --git a/CHANGELOG.md b/CHANGELOG.md index 3282966e7..c78770612 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Changes: +- Add UPC-E support - Support adding a front and back photo to each card - Fix useless whitespace in notes from Fidme import diff --git a/app/src/main/java/protect/card_locker/BarcodeImageWriterTask.java b/app/src/main/java/protect/card_locker/BarcodeImageWriterTask.java index db5902fc8..39d13c4a2 100644 --- a/app/src/main/java/protect/card_locker/BarcodeImageWriterTask.java +++ b/app/src/main/java/protect/card_locker/BarcodeImageWriterTask.java @@ -133,6 +133,8 @@ class BarcodeImageWriterTask extends AsyncTask return "1003"; case UPC_A: return "123456789012"; + case UPC_E: + return "0123456"; default: throw new IllegalArgumentException("No fallback known for this barcode type"); } diff --git a/app/src/main/java/protect/card_locker/BarcodeSelectorActivity.java b/app/src/main/java/protect/card_locker/BarcodeSelectorActivity.java index 191a6e010..9a3a2a424 100644 --- a/app/src/main/java/protect/card_locker/BarcodeSelectorActivity.java +++ b/app/src/main/java/protect/card_locker/BarcodeSelectorActivity.java @@ -58,7 +58,8 @@ public class BarcodeSelectorActivity extends AppCompatActivity BarcodeFormat.ITF.name(), BarcodeFormat.PDF_417.name(), BarcodeFormat.QR_CODE.name(), - BarcodeFormat.UPC_A.name() + BarcodeFormat.UPC_A.name(), + BarcodeFormat.UPC_E.name() )); private Map> barcodeViewMap; @@ -90,6 +91,7 @@ public class BarcodeSelectorActivity extends AppCompatActivity .put(BarcodeFormat.PDF_417.name(), new Pair<>(R.id.pdf417Barcode, R.id.pdf417BarcodeText)) .put(BarcodeFormat.QR_CODE.name(), new Pair<>(R.id.qrcodeBarcode, R.id.qrcodeBarcodeText)) .put(BarcodeFormat.UPC_A.name(), new Pair<>(R.id.upcaBarcode, R.id.upcaBarcodeText)) + .put(BarcodeFormat.UPC_E.name(), new Pair<>(R.id.upceBarcode, R.id.upceBarcodeText)) .build(); EditText cardId = findViewById(R.id.cardId); diff --git a/app/src/main/res/layout/barcode_selector_activity.xml b/app/src/main/res/layout/barcode_selector_activity.xml index 5cbb27494..d2c258844 100644 --- a/app/src/main/res/layout/barcode_selector_activity.xml +++ b/app/src/main/res/layout/barcode_selector_activity.xml @@ -304,6 +304,27 @@ android:textStyle="bold" android:layout_weight="1.0" /> + + + +