Comments (6)
ViewfinderView类的onDraw方法中。
// 绘制扫描框以外4个区域 drawMask(canvas, frame); // 如果有二维码结果的Bitmap,在扫取景框内绘制不透明的result Bitmap if (resultBitmap != null) { paint.setAlpha(CURRENT_POINT_OPACITY); canvas.drawBitmap(resultBitmap, null, frame, paint); }
这部分注释掉就可以不会出现问题描述的情况。如果这么做了,会有其他的情况出现么?
from android-zxing.
里面有个
private void restartPreviewAfterDelay(long delayMS) {
mScannerView.restartPreviewAfterDelay(delayMS);
resetStatusView();
}调用一下就好了
from android-zxing.
感谢回复。您说的方法可以重新二次扫描。在任何一次扫描结束。不退出当前二维码扫描的Activity的话。界面确实会仍然有扫描的二维码bitmap的残留。如果调用restartPreviewAfterDelay(long delayMS) 中的时间设置如果过短的话。则会出现连续扫描的情况。当然这个是可以通过设置标记的方法来决定是否对之后的扫描结果进行处理。最后。。感谢您提供的开源代码。
from android-zxing.
上面的大兄弟,源码不是我写的,真是尴尬。
from android-zxing.
Zxing当然不是了。不过能够借鉴,学习就可以了。
from android-zxing.
可以考虑加入扫描成功后的残影控制开关,不需要残影应该显示什么?继续扫描?如何合理的提醒用户?给个建议,谢谢!
from android-zxing.
Related Issues (20)
- camera 有开放出来么 怎么获取到
- 扫描界面锁屏后再打开黑屏 HOT 6
- can't find referenced method 'int save(int)' in library class android.graphics.Canvas HOT 3
- 图片导入扫码 HOT 1
- 能不能支持自动检测,提示开启闪光灯? HOT 1
- app编译版本28,模块无法正常运行 HOT 2
- java.lang.IllegalArgumentException:Crop rectangle does not fit within image data.
- java.lang.ArrayIndexOutOfBoundsException
- 下载android studio3.4.1之后,com.google.zxing.Result 找不到, HOT 3
- Android5.1创建二维码报UnsupportedEncodingException: java.nio.charset.CharsetICU[UTF-8] HOT 1
- 报错java.lang.UnsupportedOperationException: Binary XML file line #-1: You must supply a layout_width attribute.
- 如何释放scannerview,就是我感觉在一个界面使用scannerview后面隐藏显示我请求的数据,这个页面就会有点卡顿
- 在扫描界面,切换到系统设置关闭相机权限,再切换回扫描界面,app就挂了。
- 横屏、竖屏一切换就崩溃 HOT 1
- 无法扫描反色二维码 HOT 4
- ...
- 扫码页面高度不是全屏的时候在红米手机上会出现预览界面压缩 很难识别
- 前置摄像头扫条形码怎么识别 HOT 1
- jcenter停止维护,近期有迁移计划吗? HOT 3
- 如何自定义选择摄像头扫描,不想默认摄像头我想自己选择哪个摄像头进行扫描如何实现。请回答一下谢谢
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-zxing.