This commit is contained in:
Jenly
2020-04-28 22:29:44 +08:00
parent 282c3dc39e
commit 4d607cf849
5 changed files with 28 additions and 27 deletions

View File

@@ -3,14 +3,14 @@
![Image](app/src/main/ic_launcher-web.png) ![Image](app/src/main/ic_launcher-web.png)
[![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/ZXingLite/master/app/release/app-release.apk) [![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/ZXingLite/master/app/release/app-release.apk)
[![JCenter](https://img.shields.io/badge/JCenter-1.1.8-46C018.svg)](https://bintray.com/beta/#/jenly/maven/zxing-lite) [![JCenter](https://img.shields.io/badge/JCenter-1.1.9-46C018.svg)](https://bintray.com/beta/#/jenly/maven/zxing-lite)
[![JitPack](https://jitpack.io/v/jenly1314/ZXingLite.svg)](https://jitpack.io/#jenly1314/ZXingLite) [![JitPack](https://jitpack.io/v/jenly1314/ZXingLite.svg)](https://jitpack.io/#jenly1314/ZXingLite)
[![CI](https://travis-ci.org/jenly1314/ZXingLite.svg?branch=master)](https://travis-ci.org/jenly1314/ZXingLite) [![CI](https://travis-ci.org/jenly1314/ZXingLite.svg?branch=master)](https://travis-ci.org/jenly1314/ZXingLite)
[![CircleCI](https://circleci.com/gh/jenly1314/ZXingLite.svg?style=svg)](https://circleci.com/gh/jenly1314/ZXingLite) [![CircleCI](https://circleci.com/gh/jenly1314/ZXingLite.svg?style=svg)](https://circleci.com/gh/jenly1314/ZXingLite)
[![API](https://img.shields.io/badge/API-16%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=16) [![API](https://img.shields.io/badge/API-16%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=16)
[![License](https://img.shields.io/badge/license-Apche%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) [![License](https://img.shields.io/badge/license-Apche%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![Blog](https://img.shields.io/badge/blog-Jenly-9933CC.svg)](https://jenly1314.github.io/) [![Blog](https://img.shields.io/badge/blog-Jenly-9933CC.svg)](https://jenly1314.github.io/)
[![QQGroup](https://img.shields.io/badge/QQGroup-20867961-blue.svg)](http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1.1.882c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad) [![QQGroup](https://img.shields.io/badge/QQGroup-20867961-blue.svg)](http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1.1.982c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad)
ZXingLite for Android 是ZXing的精简版基于ZXing库优化扫码和生成二维码/条形码功能,扫码界面完全支持自定义,也可一行代码使用默认实现的扫码功能。总之你想要的都在这里。 ZXingLite for Android 是ZXing的精简版基于ZXing库优化扫码和生成二维码/条形码功能,扫码界面完全支持自定义,也可一行代码使用默认实现的扫码功能。总之你想要的都在这里。
>简单如斯,你不试试? Come on~ >简单如斯,你不试试? Come on~
@@ -55,21 +55,21 @@ ZXingLite for Android 是ZXing的精简版基于ZXing库优化扫码和生成
<dependency> <dependency>
<groupId>com.king.zxing</groupId> <groupId>com.king.zxing</groupId>
<artifactId>zxing-lite</artifactId> <artifactId>zxing-lite</artifactId>
<version>1.1.8</version> <version>1.1.9</version>
<type>pom</type> <type>pom</type>
</dependency> </dependency>
``` ```
### Gradle: ### Gradle:
```gradle ```gradle
//AndroidX 版本 //AndroidX 版本
implementation 'com.king.zxing:zxing-lite:1.1.8-androidx' implementation 'com.king.zxing:zxing-lite:1.1.9-androidx'
//Android 版本 //Android 版本
implementation 'com.king.zxing:zxing-lite:1.1.8' implementation 'com.king.zxing:zxing-lite:1.1.9'
``` ```
### Lvy: ### Lvy:
```lvy ```lvy
<dependency org='com.king.zxing' name='zxing-lite' rev='1.1.8'> <dependency org='com.king.zxing' name='zxing-lite' rev='1.1.9'>
<artifact name='$AID' ext='pom'></artifact> <artifact name='$AID' ext='pom'></artifact>
</dependency> </dependency>
``` ```
@@ -170,13 +170,16 @@ api 'com.google.zxing:core:3.3.3'
## 版本记录 ## 版本记录
#### v1.1.92020-4-28
* 修复1.1.8版本优化细节时不小心改出个Bug(fix #86)
#### v1.1.82020-4-27 #### v1.1.82020-4-27
* 统一日志管理 * 统一日志管理
* 优化细节 * 优化细节
#### v1.1.72020-3-29 #### v1.1.72020-3-29
* 优化一些默认参数配置 * 优化一些默认参数配置
* 修复扫码界面开启闪光灯并切到后台时手电筒按钮状态未同步问题fix#81 * 修复扫码界面开启闪光灯并切到后台时手电筒按钮状态未同步问题fix #81
#### v1.1.62019-12-27 #### v1.1.62019-12-27
* 生成条形码/二维码时支持自定义配置颜色 * 生成条形码/二维码时支持自定义配置颜色
@@ -186,8 +189,8 @@ api 'com.google.zxing:core:3.3.3'
* 优化Camera初始化相关策略减少出现卡顿的可能性 * 优化Camera初始化相关策略减少出现卡顿的可能性
#### v1.1.42019-11-18 #### v1.1.42019-11-18
* 内置手电筒按钮,当光线太暗时,自动显示手电筒 (fix#58) * 内置手电筒按钮,当光线太暗时,自动显示手电筒 (fix #58)
* 生成二维码时Logo支持自定义大小 (fix#62) * 生成二维码时Logo支持自定义大小 (fix #62)
#### v1.1.32019-9-24 #### v1.1.32019-9-24
* 支持真实识别区域比例和识别区域偏移量可配置 * 支持真实识别区域比例和识别区域偏移量可配置
@@ -253,7 +256,7 @@ api 'com.google.zxing:core:3.3.3'
Github: <a title="Github开源项目" href="https://github.com/jenly1314" target="_blank">jenly1314</a> Github: <a title="Github开源项目" href="https://github.com/jenly1314" target="_blank">jenly1314</a>
加入QQ群: <a title="点击加入QQ群" href="http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1.1.882c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad" target="_blank">20867961</a> 加入QQ群: <a title="点击加入QQ群" href="http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1.1.982c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad" target="_blank">20867961</a>
<div> <div>
<img src="https://jenly1314.github.io/image/jenly666.png"> <img src="https://jenly1314.github.io/image/jenly666.png">
<img src="https://jenly1314.github.io/image/qqgourp.png"> <img src="https://jenly1314.github.io/image/qqgourp.png">

Binary file not shown.

View File

@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":24,"versionName":"1.1.8-androidx","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":26,"versionName":"1.1.9-androidx","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

View File

@@ -22,7 +22,6 @@ import android.graphics.Bitmap;
import android.graphics.Rect; import android.graphics.Rect;
import android.graphics.RectF; import android.graphics.RectF;
import android.hardware.Camera; import android.hardware.Camera;
import android.util.Log;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.SurfaceHolder; import android.view.SurfaceHolder;
import android.view.SurfaceView; import android.view.SurfaceView;
@@ -526,19 +525,18 @@ public class CaptureHelper implements CaptureLifecycle,CaptureTouchEvent,Capture
return; return;
} }
if(isPlayBeep){//如果播放音效,则稍微延迟一点,给予播放音效时间 if(isPlayBeep && captureHandler != null){//如果播放音效,则稍微延迟一点,给予播放音效时间
if(captureHandler != null){ captureHandler.postDelayed(() -> {
captureHandler.postDelayed(() -> { //如果设置了回调并且onCallback返回为true则表示拦截
//如果设置了回调并且onCallback返回为true则表示拦截 if(onCaptureCallback!=null && onCaptureCallback.onResultCallback(text)){
if(onCaptureCallback!=null && onCaptureCallback.onResultCallback(text)){ return;
return; }
} Intent intent = new Intent();
Intent intent = new Intent(); intent.putExtra(Intents.Scan.RESULT,text);
intent.putExtra(Intents.Scan.RESULT,text); activity.setResult(Activity.RESULT_OK,intent);
activity.setResult(Activity.RESULT_OK,intent); activity.finish();
activity.finish(); },100);
},100);
}
return; return;
} }

View File

@@ -1,7 +1,7 @@
//App //App
def app_version = [:] def app_version = [:]
app_version.versionCode = 24 app_version.versionCode = 26
app_version.versionName = "1.1.8-androidx" app_version.versionName = "1.1.9-androidx"
ext.app_version = app_version ext.app_version = app_version
//build version //build version