Add EAN_13 support

closes #76
This commit is contained in:
ligi 2016-04-18 01:27:00 +02:00
parent 618b2a652f
commit e0ff222563
2 changed files with 5 additions and 2 deletions

View file

@ -7,7 +7,8 @@ public enum PassBarCodeFormat {
AZTEC,
CODE_39,
CODE_128,
QR_CODE;
QR_CODE,
EAN_13;
public boolean isQuadratic() {
switch (this) {
@ -32,6 +33,8 @@ public enum PassBarCodeFormat {
return BarcodeFormat.CODE_128;
case PDF_417:
return BarcodeFormat.PDF_417;
case EAN_13:
return BarcodeFormat.EAN_13;
default:
return BarcodeFormat.QR_CODE;

View file

@ -91,7 +91,7 @@ class BarcodeEditController(val rootView: View, internal val context: AppCompatA
}
context.supportFragmentManager.beginTransaction().add(intentFragment, "intent_fragment").commit()
bindRadio(arrayOf(AZTEC, QR_CODE, PDF_417, CODE_39, CODE_128))
bindRadio(PassBarCodeFormat.values())
messageInput.setText(barCode.message)
messageInput.addTextChangedListener(object : SimpleTextWatcher() {