优化细节

This commit is contained in:
Jenly
2021-01-14 16:27:31 +08:00
parent 4ad01a3ba4
commit 95d129f53f
5 changed files with 41 additions and 35 deletions

View File

@@ -40,7 +40,7 @@ public class QRCodeActivity extends CaptureActivity {
//初始化解码配置
DecodeConfig decodeConfig = new DecodeConfig();
decodeConfig.setHints(DecodeFormatManager.QR_CODE_HINTS)//如果只有识别二维码的需求,这样设置效率会更高
decodeConfig.setHints(DecodeFormatManager.QR_CODE_HINTS)//如果只有识别二维码的需求,这样设置效率会更高不设置默认为DecodeFormatManager.DEFAULT_HINTS
.setFullAreaScan(false)//设置是否全区域识别默认false
.setAreaRectRatio(0.8f)//设置识别区域比例默认0.8,设置的比例最终会在预览区域裁剪基于此比例的一个矩形进行扫码识别
.setAreaRectVerticalOffset(0)//设置识别区域垂直方向偏移量默认为0为0表示居中可以为负数