Update README
This commit is contained in:
37
README.md
37
README.md
@@ -14,8 +14,7 @@
|
|||||||
[](http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1.1.982c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad)
|
[](http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1.1.982c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad)
|
||||||
|
|
||||||
ZXingLite for Android 是ZXing的精简极速版,基于ZXing库优化扫码和生成二维码/条形码功能,扫码界面完全支持自定义,也可一行代码使用默认实现的扫码功能。总之你想要的都在这里。
|
ZXingLite for Android 是ZXing的精简极速版,基于ZXing库优化扫码和生成二维码/条形码功能,扫码界面完全支持自定义,也可一行代码使用默认实现的扫码功能。总之你想要的都在这里。
|
||||||
>简单如斯,你不试试? Come on~
|
> 简单如斯,你不试试?
|
||||||
|
|
||||||
|
|
||||||
## Gif 展示
|
## Gif 展示
|
||||||

|

|
||||||
@@ -26,17 +25,17 @@ ZXingLite for Android 是ZXing的精简极速版,基于ZXing库优化扫码和
|
|||||||
## ViewfinderView属性说明
|
## ViewfinderView属性说明
|
||||||
|
|
||||||
| 属性 | 属性类型 | 默认值 | 属性说明 |
|
| 属性 | 属性类型 | 默认值 | 属性说明 |
|
||||||
|:------------------------|:----------| :------ | :------ |
|
|:------------------------|:----------|:-------------------------------------|:--------------------------------------------------|
|
||||||
| maskColor | color |<font color=#000000>#60000000</font>| 扫描区外遮罩的颜色 |
|
| maskColor | color | <font color=#000000>#60000000</font> | 扫描区外遮罩的颜色 |
|
||||||
| frameColor | color |<font color=#1FB3E2>#7F1FB3E2</font>| 扫描区边框的颜色 |
|
| frameColor | color | <font color=#1FB3E2>#7F1FB3E2</font> | 扫描区边框的颜色 |
|
||||||
| cornerColor | color |<font color=#1FB3E2>#FF1FB3E2</font>| 扫描区边角的颜色 |
|
| cornerColor | color | <font color=#1FB3E2>#FF1FB3E2</font> | 扫描区边角的颜色 |
|
||||||
| laserColor | color |<font color=#1FB3E2>#FF1FB3E2</font>| 扫描区激光线的颜色 |
|
| laserColor | color | <font color=#1FB3E2>#FF1FB3E2</font> | 扫描区激光线的颜色 |
|
||||||
| labelText | string | | 扫描提示文本信息 |
|
| labelText | string | | 扫描提示文本信息 |
|
||||||
| labelTextColor | color |<font color=#C0C0C0>#FFC0C0C0</font>| 提示文本字体颜色 |
|
| labelTextColor | color | <font color=#C0C0C0>#FFC0C0C0</font> | 提示文本字体颜色 |
|
||||||
| labelTextSize | dimension |14sp| 提示文本字体大小 |
|
| labelTextSize | dimension | 14sp | 提示文本字体大小 |
|
||||||
| labelTextPadding | dimension |24dp| 提示文本距离扫描区的间距 |
|
| labelTextPadding | dimension | 24dp | 提示文本距离扫描区的间距 |
|
||||||
| labelTextWidth | dimension | | 提示文本的宽度,默认为View的宽度 |
|
| labelTextWidth | dimension | | 提示文本的宽度,默认为View的宽度 |
|
||||||
| labelTextLocation | enum |bottom| 提示文本显示位置 |
|
| labelTextLocation | enum | bottom | 提示文本显示位置 |
|
||||||
| frameWidth | dimension | | 扫码框宽度 |
|
| frameWidth | dimension | | 扫码框宽度 |
|
||||||
| frameHeight | dimension | | 扫码框高度 |
|
| frameHeight | dimension | | 扫码框高度 |
|
||||||
| laserStyle | enum | line | 扫描激光的样式 |
|
| laserStyle | enum | line | 扫描激光的样式 |
|
||||||
@@ -101,6 +100,21 @@ implementation 'com.github.jenly1314:zxing-lite:2.4.0'
|
|||||||
#### 对于需兼容 Android 5.0 (N) 以下版本的老项目(即:minSdk<21),可使用1.x旧版本
|
#### 对于需兼容 Android 5.0 (N) 以下版本的老项目(即:minSdk<21),可使用1.x旧版本
|
||||||
|
|
||||||
**v1.x** 旧版本 [v1.1.9](https://github.com/jenly1314/ZXingLite/tree/androidx)
|
**v1.x** 旧版本 [v1.1.9](https://github.com/jenly1314/ZXingLite/tree/androidx)
|
||||||
|
|
||||||
|
> 对于 **v1.x** 版本,当你看到这里,此时的 **JCenter** 仓库如果已关闭, 可使用 **JitPack** 仓库
|
||||||
|
|
||||||
|
**JCenter**
|
||||||
|
|
||||||
|
1. 在Project的 **build.gradle** 里面添加远程仓库
|
||||||
|
```gradle
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
//...
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
2. 在Module的 **build.gradle** 里面添加引入依赖项
|
||||||
```gradle
|
```gradle
|
||||||
// AndroidX 版本
|
// AndroidX 版本
|
||||||
implementation 'com.king.zxing:zxing-lite:1.1.9-androidx'
|
implementation 'com.king.zxing:zxing-lite:1.1.9-androidx'
|
||||||
@@ -108,7 +122,6 @@ implementation 'com.king.zxing:zxing-lite:1.1.9-androidx'
|
|||||||
// Android Support 版本
|
// Android Support 版本
|
||||||
implementation 'com.king.zxing:zxing-lite:1.1.9'
|
implementation 'com.king.zxing:zxing-lite:1.1.9'
|
||||||
```
|
```
|
||||||
> 对于 **v1.x** 版本,如果 **JCenter** 已关闭, 可使用 **JitPack**
|
|
||||||
|
|
||||||
## 使用说明
|
## 使用说明
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user