mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2025-12-24 07:38:00 -05:00
Compare commits
1 Commits
v2.40.0
...
fix/barcod
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65d8d45018 |
@@ -17,6 +17,7 @@ import com.google.zxing.common.BitMatrix;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import protect.card_locker.async.CompatCallable;
|
||||
import protect.card_locker.barcodes.Barcode;
|
||||
|
||||
/**
|
||||
* This task will generate a barcode and load it into an ImageView.
|
||||
@@ -38,7 +39,7 @@ public class BarcodeImageWriterTask implements CompatCallable<Bitmap> {
|
||||
private final WeakReference<ImageView> imageViewReference;
|
||||
private final WeakReference<TextView> textViewReference;
|
||||
private String cardId;
|
||||
private final CatimaBarcode format;
|
||||
private final Barcode format;
|
||||
private final int imageHeight;
|
||||
private final int imageWidth;
|
||||
private final boolean showFallback;
|
||||
@@ -46,7 +47,7 @@ public class BarcodeImageWriterTask implements CompatCallable<Bitmap> {
|
||||
|
||||
BarcodeImageWriterTask(
|
||||
Context context, ImageView imageView, String cardIdString,
|
||||
CatimaBarcode barcodeFormat, TextView textView,
|
||||
Barcode barcodeFormat, TextView textView,
|
||||
boolean showFallback, Runnable callback, boolean roundCornerPadding
|
||||
) {
|
||||
mContext = context;
|
||||
@@ -90,68 +91,8 @@ public class BarcodeImageWriterTask implements CompatCallable<Bitmap> {
|
||||
this.showFallback = showFallback;
|
||||
}
|
||||
|
||||
private int getMaxWidth(CatimaBarcode format) {
|
||||
switch (format.format()) {
|
||||
// 2D barcodes
|
||||
case AZTEC:
|
||||
case DATA_MATRIX:
|
||||
case MAXICODE:
|
||||
case PDF_417:
|
||||
case QR_CODE:
|
||||
return MAX_WIDTH_2D;
|
||||
|
||||
// 1D barcodes:
|
||||
case CODABAR:
|
||||
case CODE_39:
|
||||
case CODE_93:
|
||||
case CODE_128:
|
||||
case EAN_8:
|
||||
case EAN_13:
|
||||
case ITF:
|
||||
case UPC_A:
|
||||
case UPC_E:
|
||||
case RSS_14:
|
||||
case RSS_EXPANDED:
|
||||
case UPC_EAN_EXTENSION:
|
||||
default:
|
||||
return MAX_WIDTH_1D;
|
||||
}
|
||||
}
|
||||
|
||||
private String getFallbackString(CatimaBarcode format) {
|
||||
switch (format.format()) {
|
||||
// 2D barcodes
|
||||
case AZTEC:
|
||||
return "AZTEC";
|
||||
case DATA_MATRIX:
|
||||
return "DATA_MATRIX";
|
||||
case PDF_417:
|
||||
return "PDF_417";
|
||||
case QR_CODE:
|
||||
return "QR_CODE";
|
||||
|
||||
// 1D barcodes:
|
||||
case CODABAR:
|
||||
return "C0C";
|
||||
case CODE_39:
|
||||
return "CODE_39";
|
||||
case CODE_93:
|
||||
return "CODE_93";
|
||||
case CODE_128:
|
||||
return "CODE_128";
|
||||
case EAN_8:
|
||||
return "32123456";
|
||||
case EAN_13:
|
||||
return "5901234123457";
|
||||
case ITF:
|
||||
return "1003";
|
||||
case UPC_A:
|
||||
return "123456789012";
|
||||
case UPC_E:
|
||||
return "0123456";
|
||||
default:
|
||||
throw new IllegalArgumentException("No fallback known for this barcode type");
|
||||
}
|
||||
private int getMaxWidth(Barcode format) {
|
||||
return format.is2D() ? MAX_WIDTH_2D : MAX_WIDTH_1D;
|
||||
}
|
||||
|
||||
private Bitmap generate() {
|
||||
@@ -227,7 +168,7 @@ public class BarcodeImageWriterTask implements CompatCallable<Bitmap> {
|
||||
|
||||
if (showFallback && !Thread.currentThread().isInterrupted()) {
|
||||
Log.i(TAG, "Barcode generation failed, generating fallback...");
|
||||
cardId = getFallbackString(format);
|
||||
cardId = format.exampleValue();
|
||||
bitmap = generate();
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,9 @@ import java.util.ArrayList;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import protect.card_locker.barcodes.Barcode;
|
||||
import protect.card_locker.barcodes.BarcodeFactory;
|
||||
import protect.card_locker.barcodes.BarcodeWithValue;
|
||||
|
||||
/**
|
||||
* This activity is callable and will allow a user to enter
|
||||
@@ -86,10 +89,10 @@ public class BarcodeSelectorActivity extends CatimaAppCompatActivity implements
|
||||
|
||||
private void generateBarcodes(String value) {
|
||||
// Update barcodes
|
||||
ArrayList<CatimaBarcodeWithValue> barcodes = new ArrayList<>();
|
||||
for (BarcodeFormat barcodeFormat : CatimaBarcode.barcodeFormats) {
|
||||
CatimaBarcode catimaBarcode = CatimaBarcode.fromBarcode(barcodeFormat);
|
||||
barcodes.add(new CatimaBarcodeWithValue(catimaBarcode, value));
|
||||
ArrayList<BarcodeWithValue> barcodes = new ArrayList<>();
|
||||
for (BarcodeFormat barcodeFormat : BarcodeFactory.getAllFormats()) {
|
||||
Barcode catimaBarcode = BarcodeFactory.fromBarcode(barcodeFormat);
|
||||
barcodes.add(new BarcodeWithValue(catimaBarcode, value));
|
||||
}
|
||||
mAdapter.setBarcodes(barcodes);
|
||||
}
|
||||
@@ -118,7 +121,7 @@ public class BarcodeSelectorActivity extends CatimaAppCompatActivity implements
|
||||
|
||||
@Override
|
||||
public void onRowClicked(int inputPosition, View view) {
|
||||
CatimaBarcodeWithValue barcodeWithValue = mAdapter.getItem(inputPosition);
|
||||
BarcodeWithValue barcodeWithValue = mAdapter.getItem(inputPosition);
|
||||
CatimaBarcode catimaBarcode = barcodeWithValue.catimaBarcode();
|
||||
|
||||
if (!mAdapter.isValid(view)) {
|
||||
|
||||
@@ -13,8 +13,11 @@ import android.widget.TextView;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import protect.card_locker.async.TaskHandler;
|
||||
import protect.card_locker.barcodes.Barcode;
|
||||
import protect.card_locker.barcodes.BarcodeFactory;
|
||||
import protect.card_locker.barcodes.BarcodeWithValue;
|
||||
|
||||
public class BarcodeSelectorAdapter extends ArrayAdapter<CatimaBarcodeWithValue> {
|
||||
public class BarcodeSelectorAdapter extends ArrayAdapter<BarcodeWithValue> {
|
||||
private static final String TAG = "Catima";
|
||||
|
||||
private final TaskHandler mTasks = new TaskHandler();
|
||||
@@ -29,12 +32,12 @@ public class BarcodeSelectorAdapter extends ArrayAdapter<CatimaBarcodeWithValue>
|
||||
void onRowClicked(int inputPosition, View view);
|
||||
}
|
||||
|
||||
public BarcodeSelectorAdapter(Context context, ArrayList<CatimaBarcodeWithValue> barcodes, BarcodeSelectorListener barcodeSelectorListener) {
|
||||
public BarcodeSelectorAdapter(Context context, ArrayList<BarcodeWithValue> barcodes, BarcodeSelectorListener barcodeSelectorListener) {
|
||||
super(context, 0, barcodes);
|
||||
mListener = barcodeSelectorListener;
|
||||
}
|
||||
|
||||
public void setBarcodes(ArrayList<CatimaBarcodeWithValue> barcodes) {
|
||||
public void setBarcodes(ArrayList<BarcodeWithValue> barcodes) {
|
||||
clear();
|
||||
addAll(barcodes);
|
||||
notifyDataSetChanged();
|
||||
@@ -43,9 +46,9 @@ public class BarcodeSelectorAdapter extends ArrayAdapter<CatimaBarcodeWithValue>
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
CatimaBarcodeWithValue catimaBarcodeWithValue = getItem(position);
|
||||
CatimaBarcode catimaBarcode = catimaBarcodeWithValue.catimaBarcode();
|
||||
String value = catimaBarcodeWithValue.value();
|
||||
BarcodeWithValue barcodeWithValue = getItem(position);
|
||||
Barcode catimaBarcode = barcodeWithValue.barcode();
|
||||
String value = barcodeWithValue.value();
|
||||
|
||||
ViewHolder viewHolder;
|
||||
if (convertView == null) {
|
||||
@@ -73,7 +76,7 @@ public class BarcodeSelectorAdapter extends ArrayAdapter<CatimaBarcodeWithValue>
|
||||
}
|
||||
|
||||
private void createBarcodeOption(final ImageView image, final String formatType, final String cardId, final TextView text) {
|
||||
final CatimaBarcode format = CatimaBarcode.fromName(formatType);
|
||||
final Barcode format = BarcodeFactory.fromName(formatType);
|
||||
|
||||
image.setImageBitmap(null);
|
||||
image.setClipToOutline(true);
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
package protect.card_locker;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class CatimaBarcode {
|
||||
public static final List<BarcodeFormat> barcodeFormats = Collections.unmodifiableList(Arrays.asList(
|
||||
BarcodeFormat.AZTEC,
|
||||
BarcodeFormat.CODE_39,
|
||||
BarcodeFormat.CODE_93,
|
||||
BarcodeFormat.CODE_128,
|
||||
BarcodeFormat.CODABAR,
|
||||
BarcodeFormat.DATA_MATRIX,
|
||||
BarcodeFormat.EAN_8,
|
||||
BarcodeFormat.EAN_13,
|
||||
BarcodeFormat.ITF,
|
||||
BarcodeFormat.PDF_417,
|
||||
BarcodeFormat.QR_CODE,
|
||||
BarcodeFormat.UPC_A,
|
||||
BarcodeFormat.UPC_E
|
||||
));
|
||||
|
||||
public static final List<String> barcodePrettyNames = Collections.unmodifiableList(Arrays.asList(
|
||||
"Aztec",
|
||||
"Code 39",
|
||||
"Code 93",
|
||||
"Code 128",
|
||||
"Codabar",
|
||||
"Data Matrix",
|
||||
"EAN 8",
|
||||
"EAN 13",
|
||||
"ITF",
|
||||
"PDF 417",
|
||||
"QR Code",
|
||||
"UPC A",
|
||||
"UPC E"
|
||||
));
|
||||
|
||||
private final BarcodeFormat mBarcodeFormat;
|
||||
|
||||
private CatimaBarcode(BarcodeFormat barcodeFormat) {
|
||||
mBarcodeFormat = barcodeFormat;
|
||||
}
|
||||
|
||||
public static CatimaBarcode fromBarcode(BarcodeFormat barcodeFormat) {
|
||||
return new CatimaBarcode(barcodeFormat);
|
||||
}
|
||||
|
||||
public static CatimaBarcode fromName(String name) {
|
||||
return new CatimaBarcode(BarcodeFormat.valueOf(name));
|
||||
}
|
||||
|
||||
public static CatimaBarcode fromPrettyName(String prettyName) {
|
||||
try {
|
||||
return new CatimaBarcode(barcodeFormats.get(barcodePrettyNames.indexOf(prettyName)));
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
throw new IllegalArgumentException("No barcode type with pretty name " + prettyName + " known!");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isSupported() {
|
||||
return barcodeFormats.contains(mBarcodeFormat);
|
||||
}
|
||||
|
||||
public boolean isSquare() {
|
||||
return mBarcodeFormat == BarcodeFormat.AZTEC
|
||||
|| mBarcodeFormat == BarcodeFormat.DATA_MATRIX
|
||||
|| mBarcodeFormat == BarcodeFormat.MAXICODE
|
||||
|| mBarcodeFormat == BarcodeFormat.QR_CODE;
|
||||
}
|
||||
|
||||
public boolean hasInternalPadding() {
|
||||
return mBarcodeFormat == BarcodeFormat.PDF_417
|
||||
|| mBarcodeFormat == BarcodeFormat.QR_CODE;
|
||||
}
|
||||
|
||||
public BarcodeFormat format() {
|
||||
return mBarcodeFormat;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return mBarcodeFormat.name();
|
||||
}
|
||||
|
||||
public String prettyName() {
|
||||
int index = barcodeFormats.indexOf(mBarcodeFormat);
|
||||
|
||||
if (index == -1 || index >= barcodePrettyNames.size()) {
|
||||
return mBarcodeFormat.name();
|
||||
}
|
||||
|
||||
return barcodePrettyNames.get(index);
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package protect.card_locker;
|
||||
|
||||
public class CatimaBarcodeWithValue {
|
||||
private final CatimaBarcode mCatimaBarcode;
|
||||
private final String mValue;
|
||||
|
||||
public CatimaBarcodeWithValue(CatimaBarcode catimaBarcode, String value) {
|
||||
mCatimaBarcode = catimaBarcode;
|
||||
mValue = value;
|
||||
}
|
||||
|
||||
public CatimaBarcode catimaBarcode() {
|
||||
return mCatimaBarcode;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return mValue;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,8 @@ import java.util.Currency;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import protect.card_locker.barcodes.Barcode;
|
||||
|
||||
public class DBHelper extends SQLiteOpenHelper {
|
||||
public static final String DATABASE_NAME = "Catima.db";
|
||||
public static final int ORIGINAL_DATABASE_VERSION = 1;
|
||||
@@ -360,7 +362,7 @@ public class DBHelper extends SQLiteOpenHelper {
|
||||
public static long insertLoyaltyCard(
|
||||
final SQLiteDatabase database, final String store, final String note, final Date expiry,
|
||||
final BigDecimal balance, final Currency balanceType, final String cardId,
|
||||
final String barcodeId, final CatimaBarcode barcodeType, final Integer headerColor,
|
||||
final String barcodeId, final Barcode barcodeType, final Integer headerColor,
|
||||
final int starStatus, final Long lastUsed, final int archiveStatus) {
|
||||
database.beginTransaction();
|
||||
|
||||
@@ -392,7 +394,7 @@ public class DBHelper extends SQLiteOpenHelper {
|
||||
public static long insertLoyaltyCard(
|
||||
final SQLiteDatabase database, final int id, final String store, final String note,
|
||||
final Date expiry, final BigDecimal balance, final Currency balanceType,
|
||||
final String cardId, final String barcodeId, final CatimaBarcode barcodeType,
|
||||
final String cardId, final String barcodeId, final Barcode barcodeType,
|
||||
final Integer headerColor, final int starStatus, final Long lastUsed, final int archiveStatus) {
|
||||
database.beginTransaction();
|
||||
|
||||
@@ -425,7 +427,7 @@ public class DBHelper extends SQLiteOpenHelper {
|
||||
public static boolean updateLoyaltyCard(
|
||||
SQLiteDatabase database, final int id, final String store, final String note,
|
||||
final Date expiry, final BigDecimal balance, final Currency balanceType,
|
||||
final String cardId, final String barcodeId, final CatimaBarcode barcodeType,
|
||||
final String cardId, final String barcodeId, final Barcode barcodeType,
|
||||
final Integer headerColor, final int starStatus, final Long lastUsed, final int archiveStatus) {
|
||||
database.beginTransaction();
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import protect.card_locker.barcodes.Barcode;
|
||||
import protect.card_locker.barcodes.BarcodeFactory;
|
||||
|
||||
public class ImportURIHelper {
|
||||
private static final String STORE = DBHelper.LoyaltyCardDbIds.STORE;
|
||||
private static final String NOTE = DBHelper.LoyaltyCardDbIds.NOTE;
|
||||
@@ -61,7 +64,7 @@ public class ImportURIHelper {
|
||||
|
||||
try {
|
||||
// These values are allowed to be null
|
||||
CatimaBarcode barcodeType = null;
|
||||
Barcode barcodeType = null;
|
||||
Date expiry = null;
|
||||
BigDecimal balance = new BigDecimal("0");
|
||||
Currency balanceType = null;
|
||||
@@ -95,7 +98,7 @@ public class ImportURIHelper {
|
||||
|
||||
String unparsedBarcodeType = kv.get(BARCODE_TYPE);
|
||||
if (unparsedBarcodeType != null && !unparsedBarcodeType.equals("")) {
|
||||
barcodeType = CatimaBarcode.fromName(unparsedBarcodeType);
|
||||
barcodeType = BarcodeFactory.fromName(unparsedBarcodeType);
|
||||
}
|
||||
|
||||
String unparsedBalance = kv.get(BALANCE);
|
||||
|
||||
@@ -9,6 +9,8 @@ import java.util.Currency;
|
||||
import java.util.Date;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import protect.card_locker.barcodes.Barcode;
|
||||
import protect.card_locker.barcodes.BarcodeFactory;
|
||||
|
||||
public class LoyaltyCard implements Parcelable {
|
||||
public final int id;
|
||||
@@ -23,7 +25,7 @@ public class LoyaltyCard implements Parcelable {
|
||||
public final String barcodeId;
|
||||
|
||||
@Nullable
|
||||
public final CatimaBarcode barcodeType;
|
||||
public final Barcode barcodeType;
|
||||
|
||||
@Nullable
|
||||
public final Integer headerColor;
|
||||
@@ -35,7 +37,7 @@ public class LoyaltyCard implements Parcelable {
|
||||
|
||||
public LoyaltyCard(final int id, final String store, final String note, final Date expiry,
|
||||
final BigDecimal balance, final Currency balanceType, final String cardId,
|
||||
@Nullable final String barcodeId, @Nullable final CatimaBarcode barcodeType,
|
||||
@Nullable final String barcodeId, @Nullable final Barcode barcodeType,
|
||||
@Nullable final Integer headerColor, final int starStatus,
|
||||
final long lastUsed, final int zoomLevel, final int archiveStatus) {
|
||||
this.id = id;
|
||||
@@ -65,7 +67,7 @@ public class LoyaltyCard implements Parcelable {
|
||||
cardId = in.readString();
|
||||
barcodeId = in.readString();
|
||||
String tmpBarcodeType = in.readString();
|
||||
barcodeType = !tmpBarcodeType.isEmpty() ? CatimaBarcode.fromName(tmpBarcodeType) : null;
|
||||
barcodeType = !tmpBarcodeType.isEmpty() ? BarcodeFactory.fromName(tmpBarcodeType) : null;
|
||||
int tmpHeaderColor = in.readInt();
|
||||
headerColor = tmpHeaderColor != -1 ? tmpHeaderColor : null;
|
||||
starStatus = in.readInt();
|
||||
@@ -109,13 +111,13 @@ public class LoyaltyCard implements Parcelable {
|
||||
int balanceTypeColumn = cursor.getColumnIndexOrThrow(DBHelper.LoyaltyCardDbIds.BALANCE_TYPE);
|
||||
int headerColorColumn = cursor.getColumnIndexOrThrow(DBHelper.LoyaltyCardDbIds.HEADER_COLOR);
|
||||
|
||||
CatimaBarcode barcodeType = null;
|
||||
Barcode barcodeType = null;
|
||||
Currency balanceType = null;
|
||||
Date expiry = null;
|
||||
Integer headerColor = null;
|
||||
|
||||
if (cursor.isNull(barcodeTypeColumn) == false) {
|
||||
barcodeType = CatimaBarcode.fromName(cursor.getString(barcodeTypeColumn));
|
||||
barcodeType = BarcodeFactory.fromName(cursor.getString(barcodeTypeColumn));
|
||||
}
|
||||
|
||||
if (cursor.isNull(balanceTypeColumn) == false) {
|
||||
|
||||
@@ -77,6 +77,8 @@ import androidx.core.content.FileProvider;
|
||||
import androidx.exifinterface.media.ExifInterface;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import protect.card_locker.async.TaskHandler;
|
||||
import protect.card_locker.barcodes.Barcode;
|
||||
import protect.card_locker.barcodes.BarcodeFactory;
|
||||
|
||||
public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
|
||||
private static final String TAG = "Catima";
|
||||
@@ -204,7 +206,7 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
|
||||
(Currency) (fieldName == LoyaltyCardField.balanceType ? value : loyaltyCard.balanceType),
|
||||
(String) (fieldName == LoyaltyCardField.cardId ? value : loyaltyCard.cardId),
|
||||
(String) (fieldName == LoyaltyCardField.barcodeId ? value : loyaltyCard.barcodeId),
|
||||
(CatimaBarcode) (fieldName == LoyaltyCardField.barcodeType ? value : loyaltyCard.barcodeType),
|
||||
(Barcode) (fieldName == LoyaltyCardField.barcodeType ? value : loyaltyCard.barcodeType),
|
||||
(Integer) (fieldName == LoyaltyCardField.headerColor ? value : loyaltyCard.headerColor),
|
||||
(int) (fieldName == LoyaltyCardField.starStatus ? value : loyaltyCard.starStatus),
|
||||
0, // Unimportant, always set to null in doSave so the DB updates it to the current timestamp
|
||||
@@ -553,13 +555,7 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
|
||||
updateTempState(LoyaltyCardField.barcodeType, null);
|
||||
} else {
|
||||
try {
|
||||
CatimaBarcode barcodeFormat = CatimaBarcode.fromPrettyName(s.toString());
|
||||
|
||||
updateTempState(LoyaltyCardField.barcodeType, barcodeFormat);
|
||||
|
||||
if (!barcodeFormat.isSupported()) {
|
||||
Toast.makeText(LoyaltyCardEditActivity.this, getString(R.string.unsupportedBarcodeType), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
updateTempState(LoyaltyCardField.barcodeType, barcodeTypeField.getTag());
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
}
|
||||
@@ -820,7 +816,7 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
|
||||
formatBalanceCurrencyField(tempLoyaltyCard.balanceType);
|
||||
cardIdFieldView.setText(tempLoyaltyCard.cardId);
|
||||
barcodeIdField.setText(tempLoyaltyCard.barcodeId != null ? tempLoyaltyCard.barcodeId : getString(R.string.sameAsCardId));
|
||||
barcodeTypeField.setText(tempLoyaltyCard.barcodeType != null ? tempLoyaltyCard.barcodeType.prettyName() : getString(R.string.noBarcode));
|
||||
setbarcodeTypeField(tempLoyaltyCard.barcodeType);
|
||||
|
||||
if (groupsChips.getChildCount() == 0) {
|
||||
List<Group> existingGroups = DBHelper.getGroups(mDatabase);
|
||||
@@ -869,9 +865,10 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
|
||||
// Update from intent
|
||||
if (barcodeType != null) {
|
||||
try {
|
||||
barcodeTypeField.setText(CatimaBarcode.fromName(barcodeType).prettyName());
|
||||
Barcode barcode = BarcodeFactory.fromName(barcodeType);
|
||||
setbarcodeTypeField(barcode);
|
||||
} catch (IllegalArgumentException e) {
|
||||
barcodeTypeField.setText(getString(R.string.noBarcode));
|
||||
setbarcodeTypeField(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -949,6 +946,11 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
private void setbarcodeTypeField(Barcode barcode) {
|
||||
barcodeTypeField.setTag(barcode);
|
||||
barcodeTypeField.setText(barcode != null ? barcode.prettyName() : getString(R.string.noBarcode));
|
||||
}
|
||||
|
||||
protected static void formatExpiryField(Context context, EditText expiryField, Date expiry) {
|
||||
expiryField.setTag(expiry);
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import protect.card_locker.async.TaskHandler;
|
||||
import protect.card_locker.barcodes.Barcode;
|
||||
import protect.card_locker.preferences.Settings;
|
||||
|
||||
public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements GestureDetector.OnGestureListener {
|
||||
@@ -101,7 +102,7 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements
|
||||
|
||||
String cardIdString;
|
||||
String barcodeIdString;
|
||||
CatimaBarcode format;
|
||||
Barcode format;
|
||||
|
||||
FloatingActionButton editButton;
|
||||
|
||||
@@ -117,7 +118,6 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements
|
||||
int mainImageIndex = 0;
|
||||
List<ImageType> imageTypes;
|
||||
private ImageView[] dots;
|
||||
boolean isBarcodeSupported = true;
|
||||
|
||||
static final String STATE_IMAGEINDEX = "imageIndex";
|
||||
static final String STATE_FULLSCREEN = "isFullscreen";
|
||||
@@ -713,17 +713,9 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements
|
||||
// Set shadow colour of store text so even same color on same color would be readable
|
||||
storeName.setShadowLayer(1, 1, 1, backgroundNeedsDarkIcons ? Color.BLACK : Color.WHITE);
|
||||
|
||||
if (format != null && !format.isSupported()) {
|
||||
isBarcodeSupported = false;
|
||||
|
||||
Toast.makeText(this, getString(R.string.unsupportedBarcodeType), Toast.LENGTH_LONG).show();
|
||||
} else if (format == null) {
|
||||
isBarcodeSupported = false;
|
||||
}
|
||||
|
||||
imageTypes = new ArrayList<>();
|
||||
|
||||
if (isBarcodeSupported) {
|
||||
if (format != null) {
|
||||
imageTypes.add(ImageType.BARCODE);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class AztecBarcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "Aztec";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.AZTEC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "AZTEC";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasInternalPadding() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
22
app/src/main/java/protect/card_locker/barcodes/Barcode.java
Normal file
22
app/src/main/java/protect/card_locker/barcodes/Barcode.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
/**
|
||||
* Abstract barcode class
|
||||
*/
|
||||
public abstract class Barcode {
|
||||
public String name() {
|
||||
return format().name();
|
||||
};
|
||||
abstract public String prettyName();
|
||||
abstract public BarcodeFormat format();
|
||||
abstract public String exampleValue();
|
||||
|
||||
abstract public boolean isSquare();
|
||||
abstract public boolean is2D();
|
||||
public boolean hasInternalPadding() {
|
||||
return false;
|
||||
};
|
||||
public boolean isSupported() { return true; };
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public class BarcodeFactory {
|
||||
public static final Map<String, BarcodeFormat> barcodeNames = new HashMap<>() {{
|
||||
put(BarcodeFormat.AZTEC.name(), BarcodeFormat.AZTEC);
|
||||
put(BarcodeFormat.CODE_39.name(), BarcodeFormat.CODE_39);
|
||||
put(BarcodeFormat.CODE_93.name(), BarcodeFormat.CODE_93);
|
||||
put(BarcodeFormat.CODE_128.name(), BarcodeFormat.CODE_128);
|
||||
put(BarcodeFormat.CODABAR.name(), BarcodeFormat.CODABAR);
|
||||
put(BarcodeFormat.DATA_MATRIX.name(), BarcodeFormat.DATA_MATRIX);
|
||||
put(BarcodeFormat.EAN_8.name(), BarcodeFormat.EAN_8);
|
||||
put(BarcodeFormat.EAN_13.name(), BarcodeFormat.EAN_13);
|
||||
put(BarcodeFormat.ITF.name(), BarcodeFormat.ITF);
|
||||
put(BarcodeFormat.PDF_417.name(), BarcodeFormat.PDF_417);
|
||||
put(BarcodeFormat.QR_CODE.name(), BarcodeFormat.QR_CODE);
|
||||
put(BarcodeFormat.UPC_A.name(), BarcodeFormat.UPC_A);
|
||||
put(BarcodeFormat.UPC_E.name(), BarcodeFormat.UPC_E);
|
||||
}};
|
||||
|
||||
public static Barcode fromBarcode(BarcodeFormat barcodeFormat) {
|
||||
switch (barcodeFormat) {
|
||||
case AZTEC: return new AztecBarcode();
|
||||
case CODE_39: return new Code39Barcode();
|
||||
case CODE_93: return new Code93Barcode();
|
||||
case CODE_128: return new Code128Barcode();
|
||||
case CODABAR: return new CodabarBarcode();
|
||||
case DATA_MATRIX: return new DataMatrixBarcode();
|
||||
case EAN_8: return new Ean8Barcode();
|
||||
case EAN_13: return new Ean13Barcode();
|
||||
case ITF: return new ItfBarcode();
|
||||
case PDF_417: return new Pdf417Barcode();
|
||||
case QR_CODE: return new QrCodeBarcode();
|
||||
case UPC_A: return new UpcABarcode();
|
||||
case UPC_E: return new UpcEBarcode();
|
||||
default: throw new IllegalArgumentException();
|
||||
}
|
||||
}
|
||||
|
||||
public static Barcode fromName(String name) {
|
||||
return fromBarcode(Objects.requireNonNull(barcodeNames.get(name)));
|
||||
}
|
||||
|
||||
public static boolean isSupported(BarcodeFormat barcodeFormat) {
|
||||
return barcodeNames.containsValue(barcodeFormat);
|
||||
}
|
||||
|
||||
public static boolean isSupported(String name) {
|
||||
return barcodeNames.containsKey(name);
|
||||
}
|
||||
|
||||
public static Collection<BarcodeFormat> getAllFormats() {
|
||||
return barcodeNames.values();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
public class BarcodeWithValue {
|
||||
private final Barcode mBarcode;
|
||||
private final String mValue;
|
||||
|
||||
public BarcodeWithValue(Barcode barcode, String value) {
|
||||
mBarcode = barcode;
|
||||
mValue = value;
|
||||
}
|
||||
|
||||
public Barcode barcode() {
|
||||
return mBarcode;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return mValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class CodabarBarcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "Codabar";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.CODABAR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "C0C";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasInternalPadding() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class Code128Barcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "Code 128";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.CODE_128;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "CODE_128";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class Code39Barcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "Code 39";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.CODE_39;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "CODE_39";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasInternalPadding() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class Code93Barcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "Code 93";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.CODE_93;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "CODE_93";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class DataMatrixBarcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "Data Matrix";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.DATA_MATRIX;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "DATA_MATRIX";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class Ean13Barcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "EAN 13";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.EAN_13;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "5901234123457";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class Ean8Barcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "EAN 8";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.EAN_8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "32123456";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class ItfBarcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "ITF";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.ITF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "1003";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class Pdf417Barcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "PDF 417";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.PDF_417;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "PDF_417";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasInternalPadding() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class QrCodeBarcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "QR Code";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.QR_CODE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "QR_CODE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasInternalPadding() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class UpcABarcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "UPC A";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.UPC_A;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "123456789012";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package protect.card_locker.barcodes;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
public class UpcEBarcode extends Barcode {
|
||||
@Override
|
||||
public String prettyName() {
|
||||
return "UPC E";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarcodeFormat format() {
|
||||
return BarcodeFormat.UPC_E;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exampleValue() {
|
||||
return "0123456";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSquare() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is2D() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,6 @@ import java.util.Currency;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import protect.card_locker.CatimaBarcode;
|
||||
import protect.card_locker.DBHelper;
|
||||
import protect.card_locker.FormatException;
|
||||
import protect.card_locker.Group;
|
||||
|
||||
@@ -18,7 +18,6 @@ import java.math.BigDecimal;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
|
||||
import protect.card_locker.CatimaBarcode;
|
||||
import protect.card_locker.DBHelper;
|
||||
import protect.card_locker.FormatException;
|
||||
import protect.card_locker.Utils;
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.util.HashMap;
|
||||
|
||||
import protect.card_locker.CatimaBarcode;
|
||||
import protect.card_locker.DBHelper;
|
||||
import protect.card_locker.FormatException;
|
||||
import protect.card_locker.ImageLocationType;
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.Currency;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import protect.card_locker.CatimaBarcode;
|
||||
import protect.card_locker.DBHelper;
|
||||
import protect.card_locker.FormatException;
|
||||
import protect.card_locker.Utils;
|
||||
|
||||
@@ -102,7 +102,6 @@
|
||||
<string name="barcodeId">قيمة الباركود</string>
|
||||
<string name="sameAsCardId">نفس بطاقة الهوية</string>
|
||||
<string name="setBarcodeId">قم بتعيين قيمة الباركود</string>
|
||||
<string name="unsupportedBarcodeType">لا يمكن عرض نوع الباركود هذا. قد يكون مدعومًا في إصدار أحدث من التطبيق.</string>
|
||||
<string name="wrongValueForBarcodeType">القيمة غير صالحة لنوع الباركود المحدد</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">تم نسخ بطاقات الهوية إلى الحافظة</string>
|
||||
<string name="intent_import_card_from_url_share_multiple_text">أريد مشاركة بعض البطاقات معك</string>
|
||||
|
||||
@@ -148,7 +148,6 @@
|
||||
<string name="addFromImage">Избор от галерията</string>
|
||||
<string name="addManually">Ръчно въвеждане</string>
|
||||
<string name="leaveWithoutSaveConfirmation">Оставяте промените незапазени\?</string>
|
||||
<string name="unsupportedBarcodeType">Щрихкод от този вид не може да бъде показан. Може да бъде поддържан в следващо издание.</string>
|
||||
<string name="importStocard">Внасяне от Stocard</string>
|
||||
<string name="importVoucherVault">Внасяне от Voucher Vault</string>
|
||||
<string name="importVoucherVaultMessage">Изберете файла <i>vouchervault.json</i>, предварително изнесен от Voucher Vault.
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
<string name="barcodeId">বারকোড আইডি</string>
|
||||
<string name="sameAsCardId">কার্ড আইডির মতো</string>
|
||||
<string name="setBarcodeId">বারকোড আইডি সেট করুন</string>
|
||||
<string name="unsupportedBarcodeType">অসমর্থিত বারকোড টাইপ</string>
|
||||
<string name="wrongValueForBarcodeType">বারকোড টাইপের জন্য ভুল মান</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">ক্লিপবোর্ড একাধিক টোস্টে অনুলিপি করুন</string>
|
||||
<string name="intent_import_card_from_url_share_multiple_text">url থেকে ইন্টেন্ট ইম্পোর্ট কার্ড একাধিক টেক্সট শেয়ার করে</string>
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
<string name="barcodeId">Barcode vrijednost</string>
|
||||
<string name="sameAsCardId">Isto kao i kartica</string>
|
||||
<string name="setBarcodeId">Postavi vrijednost za bar kod</string>
|
||||
<string name="unsupportedBarcodeType">Ovaj bar kod još nije prikazan. Ona može biti podržana u kasnijoj verziji app.</string>
|
||||
<string name="wrongValueForBarcodeType">Izabrana vrijednost nije izvršna</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">IDs kartica kopiran u clipboard</string>
|
||||
<string name="intent_import_card_from_url_share_multiple_text">Želim podijeliti karte s tobom</string>
|
||||
|
||||
@@ -129,7 +129,6 @@
|
||||
<string name="intent_import_card_from_url_share_multiple_text">Chci s vámi sdílet karty</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">ID zkopírována do schránky</string>
|
||||
<string name="wrongValueForBarcodeType">Hodnota není platná pro vybraný typ čárového kódu</string>
|
||||
<string name="unsupportedBarcodeType">Tento typ čárového kódu zatím nelze zobrazit. Možná bude podporován v pozdější verzi aplikace.</string>
|
||||
<string name="barcodeId">Hodnota čárového kódu</string>
|
||||
<string name="setBarcodeId">Nastavení hodnoty čárového kódu</string>
|
||||
<string name="sameAsCardId">Stejné jako ID</string>
|
||||
|
||||
@@ -131,7 +131,6 @@
|
||||
<string name="noBarcodeFound">Kein Barcode erkannt</string>
|
||||
<string name="addFromImage">Bild aus der Galerie wählen</string>
|
||||
<string name="settings_max_font_size_scale">Maximale Schriftgröße</string>
|
||||
<string name="unsupportedBarcodeType">Dieser Barcodetyp kann noch nicht angezeigt werden. Wir hoffen das Format in einer zukünftigen Version zu unterstützen.</string>
|
||||
<string name="wrongValueForBarcodeType">Der Wert ist für den gewählten Barcodetyp leider nicht gültig</string>
|
||||
<string name="app_resources">Freie Ressourcen von Drittanbietern: <xliff:g id="app_resources_list">%s</xliff:g></string>
|
||||
<string name="app_libraries">Freie Bibliotheken von Drittanbietern: <xliff:g id="app_libraries_list">%s</xliff:g></string>
|
||||
|
||||
@@ -148,7 +148,6 @@
|
||||
<string name="setFrontImage">Επιλογή μπροστινής εικόνας</string>
|
||||
<string name="importVoucherVaultMessage">Επιλέξτε την <i>vouchervault.json</i> εξαγωγή από το Voucher Vault για εισαγωγή.
|
||||
\nΔημιουργήστε το επιλέγοντας Εξαγωγή στο Voucher Vault.</string>
|
||||
<string name="unsupportedBarcodeType">Ο τύπος γραμμοκώδικα δεν γίνεται να εμφανιστεί ακόμα. Μπορεί να υποστηρίζεται σε μια μελλοντική έκδοση της εφαρμογής.</string>
|
||||
<string name="frontImageDescription">Μπροστινή εικόνα</string>
|
||||
<string name="photos">Φωτογραφίες</string>
|
||||
<string name="backImageDescription">Οπίσθια εικόνα</string>
|
||||
|
||||
@@ -132,7 +132,6 @@
|
||||
<string name="frontImageDescription">Imagen frontal</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">Códigos copiados al portapapeles</string>
|
||||
<string name="wrongValueForBarcodeType">El valor no es válido para el tipo de código de barras seleccionado</string>
|
||||
<string name="unsupportedBarcodeType">Este tipo de código de barras todavía no se puede visualizar. Es posible que se admita en una futura versión de la aplicación.</string>
|
||||
<string name="setBarcodeId">Establecer valor de código de barra</string>
|
||||
<string name="sameAsCardId">Igual que el código</string>
|
||||
<string name="barcodeId">Valor de código de barra</string>
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<string name="intent_import_card_from_url_share_multiple_text">Haluan jakaa joitain kortteja kanssasi</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">ID-tunnukset kopioitu leikepöydälle</string>
|
||||
<string name="wrongValueForBarcodeType">Arvo ei ole kelvollinen valitulle viivakoodityypille</string>
|
||||
<string name="unsupportedBarcodeType">Tätä viivakoodityyppiä ei voi vielä näyttää. Sitä saatetaan tukea sovelluksen myöhemmässä versiossa.</string>
|
||||
<string name="setBarcodeId">Aseta viivakoodin arvo</string>
|
||||
<string name="sameAsCardId">Sama kuin ID-tunnus</string>
|
||||
<string name="barcodeId">Viivakoodin arvo</string>
|
||||
|
||||
@@ -131,7 +131,6 @@
|
||||
<string name="sameAsCardId">Identique à l’identifiant</string>
|
||||
<string name="barcodeId">Valeur du code-barres</string>
|
||||
<string name="settings_max_font_size_scale">Taille max. de la police</string>
|
||||
<string name="unsupportedBarcodeType">Ce type de code-barres ne peut pas encore être affiché. Il sera peut-être pris en charge dans une version ultérieure de l’application.</string>
|
||||
<string name="wrongValueForBarcodeType">La valeur n’est pas valide pour le type de code-barres sélectionné</string>
|
||||
<string name="app_resources">Ressources tierces libres : <xliff:g id="app_resources_list">%s</xliff:g></string>
|
||||
<string name="app_libraries">Bibliothèques tierces libres : <xliff:g id="app_libraries_list">%s</xliff:g></string>
|
||||
|
||||
@@ -151,7 +151,6 @@
|
||||
<string name="barcodeId">Vonalkód érték</string>
|
||||
<string name="sameAsCardId">Ugyanaz, mint az azonosító</string>
|
||||
<string name="setBarcodeId">Vonalkód érték beállítása</string>
|
||||
<string name="unsupportedBarcodeType">Ez a vonalkód típus még nem megjeleníthető. Feltehetően támogatva lesz egy későbbi verzióban.</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">Azonosítók a vágólapra másolva</string>
|
||||
<string name="intent_import_card_from_url_share_multiple_text">Meg akarok veled osztani pár kártyát</string>
|
||||
<string name="frontImageDescription">Előlapi kép</string>
|
||||
|
||||
@@ -167,7 +167,6 @@
|
||||
<string name="importVoucherVault">Impor dari Voucher Vault</string>
|
||||
<string name="importVoucherVaultMessage">Pilih ekspor <i>vouchervault.json</i> Anda dari Vault Voucher untuk diimpor.
|
||||
\nBuat dengan menekan Ekspor di Vault Voucher terlebih dahulu.</string>
|
||||
<string name="unsupportedBarcodeType">Jenis barcode ini belum dapat ditampilkan. Ini mungkin didukung di versi aplikasi yang lebih baru.</string>
|
||||
<string name="wrongValueForBarcodeType">Nilai tidak berlaku untuk jenis barcode yang dipilih</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">ID disalin ke papan klip</string>
|
||||
<string name="frontImageDescription">Gambar depan</string>
|
||||
|
||||
@@ -131,7 +131,6 @@
|
||||
<string name="noBarcodeFound">Nessun codice a barre trovato</string>
|
||||
<string name="addFromImage">Seleziona immagine dalla galleria</string>
|
||||
<string name="settings_max_font_size_scale">Dimensione massima del carattere</string>
|
||||
<string name="unsupportedBarcodeType">Questo tipo di codice a barre non può ancora essere visualizzato. Potrebbe essere supportato in una versione successiva dell\'applicazione.</string>
|
||||
<string name="wrongValueForBarcodeType">Il valore non è valido per il tipo di codice a barre selezionato</string>
|
||||
<string name="app_resources">Risorse libere di terze parti: <xliff:g id="app_resources_list"> %s </xliff:g></string>
|
||||
<string name="app_libraries">Librerie libere di terze parti: <xliff:g id="app_libraries_list"> %s </xliff:g></string>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="wrongValueForBarcodeType">選択したバーコード形式ではこの番号は使用できません</string>
|
||||
<string name="unsupportedBarcodeType">このバーコード形式は表示できません。将来のアップデートにより対応するかもしれません。</string>
|
||||
<string name="setBarcodeId">バーコード番号を設定</string>
|
||||
<string name="importLoyaltyCardKeychainMessage">インポートするにはLoyalty Card Keychainでエクスポートした <i>LoyaltyCardKeychain.csv</i>ファイルを選択してください。
|
||||
\nファイルがない場合、 Loyalty Card Keychainアプリからファイルをエクスポートしてください。</string>
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
<string name="updateBarcodeQuestionTitle">Aktualiséiert barcode-Wäert\?</string>
|
||||
<string name="intent_import_card_from_url_share_text">Ech wëll eng Kaart mat dir deelen</string>
|
||||
<string name="importSuccessfulTitle">Anere sproochen</string>
|
||||
<string name="unsupportedBarcodeType">Dee barcode-Typ kann net ugewise ginn. Et kann zu enger spéiderer Versioun vun der App ënnerstëtzt ginn.</string>
|
||||
<string name="yes">Jo</string>
|
||||
<string name="importFailedTitle">Import fehlgeschlagen</string>
|
||||
<string name="importFailed">Kaarten konnten net anere sproochen ginn</string>
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
<string name="intent_import_card_from_url_share_multiple_text">Noriu su jumis pasidalyti keliomis kortelėmis</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">Kortelės ID nukopijuotas į iškarpinę</string>
|
||||
<string name="wrongValueForBarcodeType">Vertė netinkama pasirinktam brūkšninio kodo tipui</string>
|
||||
<string name="unsupportedBarcodeType">Šio brūkšninio kodo tipo dar negalima rodyti. Galbūt jis bus palaikomas vėlesnėje programėlės versijoje.</string>
|
||||
<string name="setBarcodeId">Nustatyti brūkšninio kodo reikšmę</string>
|
||||
<string name="sameAsCardId">Tokia pat kaip kortelės ID</string>
|
||||
<string name="barcodeId">Brūkšninio kodo reikšmė</string>
|
||||
|
||||
@@ -116,7 +116,6 @@
|
||||
<string name="errorReadingImage">Kunne ikke lese bildet</string>
|
||||
<string name="noBarcodeFound">Fant ingen strekkode</string>
|
||||
<string name="addFromImage">Velg bilde fra galleri</string>
|
||||
<string name="unsupportedBarcodeType">Denne strekkodetypen kan ikke vises for øyeblikket. Støtte kan bli lagt til i en senere versjon av programmet.</string>
|
||||
<string name="setBarcodeId">Sett strekkodeverdi</string>
|
||||
<string name="sameAsCardId">Samme som ID</string>
|
||||
<string name="barcodeId">Strekkodeverdi</string>
|
||||
|
||||
@@ -130,7 +130,6 @@
|
||||
<string name="sameAsCardId">Gelijk aan kaart-id</string>
|
||||
<string name="barcodeId">Barcodewaarde</string>
|
||||
<string name="settings_max_font_size_scale">Max. tekstgrootte</string>
|
||||
<string name="unsupportedBarcodeType">Dit type barcode kan nog niet worden getoond - we hopen hiervoor in een nieuwere versie ondersteuning toe te voegen.</string>
|
||||
<string name="wrongValueForBarcodeType">Deze waarde komt niet overeen met het gekozen barcodetype</string>
|
||||
<string name="app_resources">Vrije externe bronnen: <xliff:g id="app_resources_list">%s</xliff:g></string>
|
||||
<string name="app_libraries">Vrije externe bibliotheken: <xliff:g id="app_libraries_list">%s</xliff:g></string>
|
||||
|
||||
@@ -109,7 +109,6 @@
|
||||
<string name="intent_import_card_from_url_share_multiple_text">Chcę Ci udostępnić karty</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">Skopiowano ID do schowka</string>
|
||||
<string name="wrongValueForBarcodeType">Wartość nie jest prawidłowa dla wybranego typu kodu kreskowego</string>
|
||||
<string name="unsupportedBarcodeType">Nie można jeszcze wyświetlić tego typu kodu kreskowego. Być może będzie on obsługiwany w nowszej wersji aplikacji.</string>
|
||||
<string name="setBarcodeId">Ustaw wartość kodu kreskowego</string>
|
||||
<string name="sameAsCardId">Taki sam jak ID</string>
|
||||
<string name="barcodeId">Wartość kodu kreskowego</string>
|
||||
|
||||
@@ -161,7 +161,6 @@
|
||||
<string name="importVoucherVault">Importar do Voucher Vault</string>
|
||||
<string name="importVoucherVaultMessage">Selecione a exportação <i>vouchervault.json</i> do Voucher Vault para importar.
|
||||
\nCrie-a primeiro pressionando a opção \"Exportar\" no Voucher Vault.</string>
|
||||
<string name="unsupportedBarcodeType">Este tipo de código de barras ainda não pode ser mostrado. Pode vir a ser suportado numa versão posterior da aplicação.</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">Identificação copiado para a área de transferência</string>
|
||||
<string name="setFrontImage">Definir imagem frontal</string>
|
||||
<string name="setBackImage">Definir imagem de trás</string>
|
||||
|
||||
@@ -132,7 +132,6 @@
|
||||
<string name="sameAsCardId">Как номер</string>
|
||||
<string name="barcodeId">Значение штрих-кода</string>
|
||||
<string name="settings_max_font_size_scale">Максимальный размер шрифта</string>
|
||||
<string name="unsupportedBarcodeType">В настоящее время данный тип штрих-кодов не отображается. Его поддержка может быть добавлена в следующих версиях приложения.</string>
|
||||
<string name="wrongValueForBarcodeType">Недопустимое значение для выбранного типа штрих-кода</string>
|
||||
<string name="app_resources">Свободные сторонние ресурсы: <xliff:g id="app_resources_list">%s</xliff:g></string>
|
||||
<string name="app_libraries">Свободные сторонние библиотеки: <xliff:g id="app_libraries_list">%s</xliff:g></string>
|
||||
|
||||
@@ -190,7 +190,6 @@
|
||||
<string name="barcodeId">Hodnota čiarového kódu</string>
|
||||
<string name="sameAsCardId">Rovnaké ako ID</string>
|
||||
<string name="setBarcodeId">Nastavenie hodnoty čiarového kódu</string>
|
||||
<string name="unsupportedBarcodeType">Tento typ čiarového kódu zatiaľ nie je možné zobraziť. Možno bude podporovaný v neskoršej verzii aplikácie.</string>
|
||||
<string name="wrongValueForBarcodeType">Hodnota nie je platná pre vybraný typ čiarového kódu</string>
|
||||
<string name="frontImageDescription">Obrázok prednej strany</string>
|
||||
<string name="backImageDescription">Obrázok zadnej strany</string>
|
||||
|
||||
@@ -156,5 +156,4 @@
|
||||
<string name="updateBarcodeQuestionText">Spremenili ste številko kartice. Želite posodobiti tudi črtno kodo na enako vrednost?</string>
|
||||
<string name="updateBarcodeQuestionTitle">Posodobi črtno kodo?</string>
|
||||
<string name="removeImage">Odstrani sliko</string>
|
||||
<string name="unsupportedBarcodeType">Te vrste črtne kode aplikacija ne more prikazati. Morda bo to možno v prihodnosti.</string>
|
||||
</resources>
|
||||
@@ -72,7 +72,6 @@
|
||||
<string name="intent_import_card_from_url_share_multiple_text">Jag vill dela några kort med dig</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">ID:n kopierades till Urklipp</string>
|
||||
<string name="wrongValueForBarcodeType">Värdet är inte giltigt för den valda streckkodstypen</string>
|
||||
<string name="unsupportedBarcodeType">Denna streckkodstyp kan ännu inte visas. Den kan komma att stödjas i en senare version av appen.</string>
|
||||
<string name="setBarcodeId">Ange streckkodsvärde</string>
|
||||
<string name="sameAsCardId">Samma som ID:t</string>
|
||||
<string name="turn_flashlight_on">Sätt på ficklampa</string>
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
<string name="intent_import_card_from_url_share_multiple_text">Seninle birkaç kart paylaşmak istiyorum</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">Numaralar panoya kopyalandı</string>
|
||||
<string name="wrongValueForBarcodeType">Değer, seçilen barkod türü için geçerli değil</string>
|
||||
<string name="unsupportedBarcodeType">Bu barkod türü henüz görüntülenemiyor. Uygulamanın sonraki bir sürümünde desteklenebilir.</string>
|
||||
<string name="setBarcodeId">Barkod değerini ayarla</string>
|
||||
<string name="sameAsCardId">Numarayla aynı</string>
|
||||
<string name="barcodeId">Barkod değeri</string>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<string name="updateBarcodeQuestionText">Ви змінили ID. Чи ви бажаєте оновити штрих-код для використання цього ж значення\?</string>
|
||||
<string name="updateBarcodeQuestionTitle">Оновити значення штрих-коду\?</string>
|
||||
<string name="wrongValueForBarcodeType">Значення не дійсне для обраного типу штрих-коду</string>
|
||||
<string name="unsupportedBarcodeType">Цей тип штрих-коду поки що не відображається. Підтримку може бути додано в подальших версіях програми.</string>
|
||||
<string name="setBarcodeId">Встановіть значення штрих-коду</string>
|
||||
<string name="sameAsCardId">Таке ж як ID</string>
|
||||
<string name="barcodeId">Значення штрих-коду</string>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
<string name="intent_import_card_from_url_share_multiple_text">我想和你分享一些卡片</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">卡号已复制到剪贴板</string>
|
||||
<string name="wrongValueForBarcodeType">该值对所选条形码类型无效</string>
|
||||
<string name="unsupportedBarcodeType">此条形码类型尚无法显示。较新版本的应用程序可能提供支持。</string>
|
||||
<string name="setBarcodeId">设置条形码值</string>
|
||||
<string name="sameAsCardId">与卡号相同</string>
|
||||
<string name="barcodeId">条形码值</string>
|
||||
|
||||
@@ -194,7 +194,6 @@
|
||||
<string name="moveBarcodeToTopOfScreen">將條碼移至螢幕上方</string>
|
||||
<string name="moveBarcodeToCenterOfScreen">將條碼移至螢幕中央</string>
|
||||
<string name="app_loyalty_card_keychain">Loyalty Card Keychain</string>
|
||||
<string name="unsupportedBarcodeType">尚支援此條碼種類,但未來版本的應用程式可能會支援此條碼種類。</string>
|
||||
<string name="wrongValueForBarcodeType">條碼內容不適用於此條碼種類</string>
|
||||
<string name="backImageDescription">背面圖片</string>
|
||||
<string name="updateBarcodeQuestionText">您已更新了 ID,是否要更新條碼內容以匹配此 ID?</string>
|
||||
|
||||
@@ -199,7 +199,6 @@
|
||||
<string name="barcodeId">Barcode value</string>
|
||||
<string name="sameAsCardId">Same as ID</string>
|
||||
<string name="setBarcodeId">Set barcode value</string>
|
||||
<string name="unsupportedBarcodeType">This barcode type can\'t yet be displayed. It may be supported in a later version of the app.</string>
|
||||
<string name="wrongValueForBarcodeType">The value is not valid for the selected barcode type</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">IDs copied to clipboard</string>
|
||||
<string name="intent_import_card_from_url_share_multiple_text">I want to share some cards with you</string>
|
||||
|
||||
Reference in New Issue
Block a user