【发布时间】:2020-03-09 19:22:15
【问题描述】:
我使用“me.dm7.barcodescanner:zxing:1.9”从条形码中获取代码,程序运行良好但有一个问题。即使条形码不在矩形中,该程序也可以工作,此时程序给出的代码与条形码完全不同。条码在矩形上时如何使程序工作。
ViewGroup contentFrame = (ViewGroup) findViewById(R.id.ScanView);
mScannerView = new ZBarScannerView(this);
contentFrame.addView(mScannerView);
barcodeFormatEAN13 = BarcodeFormat.EAN13;
listaZaFormat.add(barcodeFormatEAN13);
mScannerView.setFormats(listaZaFormat);
askForPermission(Manifest.permission.CAMERA, CAMERA);
【问题讨论】:
标签: java android android-studio barcode zxing