优化细节

This commit is contained in:
Jenly
2020-12-25 18:36:22 +08:00
parent 46f60195fb
commit 1a09abd66c
4 changed files with 7 additions and 11 deletions

Binary file not shown.

View File

@@ -64,11 +64,13 @@ public class CustomCaptureActivity extends CaptureActivity {
super.initCameraScan();
//初始化解码配置
DecodeConfig decodeConfig = new DecodeConfig();
decodeConfig.setHints(DecodeFormatManager.DEFAULT_HINTS)////设置解码
decodeConfig.setHints(DecodeFormatManager.ALL_HINTS)////设置解码
.setSupportVerticalCode(true)//设置是否支持扫垂直的条码
.setSupportLuminanceInvert(true)//设置是否支持识别反色码,黑白颜色反转
// .setAreaRectRatio(0.9f)//设置识别区域比例默认0.9,设置的比例最终会在预览区域裁剪基于此比例的一个矩形进行扫码识别
// .setAreaRectVerticalOffset(0)//设置识别区域垂直方向偏移量默认为0为0表示居中可以为负数
// .setAreaRectHorizontalOffset(0)//设置识别区域水平方向偏移量默认为0为0表示居中可以为负数
.setFullAreaScan(true);//设置是否全区域识别默认true
.setFullAreaScan(false);//设置是否全区域识别默认true
//获取CameraScan里面有扫码相关的配置设置。CameraScan里面包含部分支持链式调用的方法即调用返回是CameraScan本身的一些配置建议在startCamera之前调用。
getCameraScan().setPlayBeep(true)//设置是否播放音效默认为false