From 779d42cdc3d0d99ee731c3f4fd02e98d44ef8980 Mon Sep 17 00:00:00 2001 From: maning <154292322@qq.com> Date: Wed, 18 Aug 2021 12:30:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 21 ++++++++++++++----- .../zxingcodedemo/CustomScanActivity.java | 3 ++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c4a4070..a516b00 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,17 @@ super.onDestroy(); mScanSurfaceView.onDestroy(); } + + @Override + public void onBackPressed() { + //多点扫描结果点显示,可以取消 + if (mScanSurfaceView != null && mScanSurfaceView.isResultPointViewShow()) { + mScanSurfaceView.hideResultPointView(); + mScanSurfaceView.restartScan(); + return; + } + super.onBackPressed(); + } } 3:生成二维码: @@ -263,6 +274,11 @@ ``` ## 版本记录: + v2.1.9: + 1.扫描结果点显示位置偏移优化 + 2.扫描结果点View支持手动取消 + 3.扫描网格线显示优化 + v2.1.8: 1.扫描结果点显示位置偏移修复 @@ -270,11 +286,6 @@ 1.支持多二维码同时扫出 2.优化扫描结果点 3.zxing版本自定义 - - v2.1.6: - 1.优化代码,防止内存泄露 - 2.生成二维码支持修改颜色和边距 - 3.整体转为AndroidX ## 感谢: diff --git a/app/src/main/java/com/maning/zxingcodedemo/CustomScanActivity.java b/app/src/main/java/com/maning/zxingcodedemo/CustomScanActivity.java index c692e0d..5a067d4 100644 --- a/app/src/main/java/com/maning/zxingcodedemo/CustomScanActivity.java +++ b/app/src/main/java/com/maning/zxingcodedemo/CustomScanActivity.java @@ -101,7 +101,8 @@ public void stopScan(View view) { @Override public void onBackPressed() { - if (mScanSurfaceView.isResultPointViewShow()) { + //多点扫描结果点显示,可以取消 + if (mScanSurfaceView != null && mScanSurfaceView.isResultPointViewShow()) { mScanSurfaceView.hideResultPointView(); mScanSurfaceView.restartScan(); return;