Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ailiwean committed Aug 24, 2020
2 parents a019f25 + f06f22e commit cd59ef2
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

两步搞定

**step1. 自定义一个View继承ZxingCameraView**
**step1. 自定义一个View继承NBZxingView**

```
class CusZxingView @JvmOverloads constructor(context: Context, attributeSet: AttributeSet? = null, def: Int = 0) : ZxingCameraView(context, attributeSet, def) {
class CusZxingView @JvmOverloads constructor(context: Context, attributeSet: AttributeSet? = null, def: Int = 0) : NBZxingView(context, attributeSet, def) {
/***
* 扫码结果回调
Expand All @@ -33,13 +33,7 @@ class CusZxingView @JvmOverloads constructor(context: Context, attributeSet: Att
Toast.makeText(context, content, Toast.LENGTH_SHORT).show()
}
/***
* 可扩展顶层View
*/
override fun provideFloorView(): View? {
return null
}
/***
* 返回扫码类型
* 1 ScanTypeConfig.HIGH_FREQUENCY 高频率格式(默认)
Expand Down Expand Up @@ -95,7 +89,7 @@ class CusZxingView @JvmOverloads constructor(context: Context, attributeSet: Att


#### 图片资源解析
在ZxingCameraView的子类中调用
在NBZxingView的子类中调用

```
parseFile(filePath: String);
Expand All @@ -119,7 +113,7 @@ protected open fun resultBackFile(content: String) {

- 安装密码1234

###### 😊 <如果觉得还凑合不错,强烈请求来上一个star 。 开源不易,多多鼓励,感谢!> 😊😊 <如果觉得还凑合不错,强烈请求来上一个star 。 开源不易,多多鼓励,感谢!> 😊
###### 😊 <如果觉得还凑合不错,强烈请求来上一个star 。 开源不易,多多鼓励,感谢!> 😊

----

Expand Down

0 comments on commit cd59ef2

Please sign in to comment.