我正在使用条形码扫描仪,其中红线和矩形看起来很小并且在角落处可见。如何在矩形框的中心绘制类似于此链接的红线?
http://blog.digitaltinder.net/wp-content/uploads/2009/08/BarcodeScanner_thumb.png
我得到的是:
我的代码如下
IntentIntegrator scanIntegrator = new IntentIntegrator(BarcodeScan.this);
scanIntegrator.initiateScan();
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
IntentResult scanningResult =IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
if (scanningResult != null) {
//get content from Intent Result
String scanContent = scanningResult.getContents();
//get format name of data scanned
String scanFormat = scanningResult.getFormatName();
Toast.makeText(getApplicationContext(), scanContent+scanFormat,Toast.LENGTH_SHORT).show();
}
}