Skip to content

Commit

Permalink
README.md文档更新
Browse files Browse the repository at this point in the history
  • Loading branch information
yunzhouhua committed Aug 20, 2018
1 parent 021dfd9 commit 1938f2b
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {

(3)Activity实现IScanQRCode,IScanQRCode中的四个方法,参照CaptureActivity对应的实现即可

### 二.二维码生成
### 二.QR格式二维码生成

1.生成普通二维码

```java
/*
* 生成一个300*300内容为“二维码内容”的二维码
* 生成一个300*300内容为“二维码内容”的QR二维码
*/
Bitmap mBitmap = EncodingUtils.createQRCode("二维码内容", 300, 300);
```
Expand All @@ -88,6 +88,29 @@ Bitmap mBitmap = EncodingUtils.createQRCode(this, "二维码内容", 300, 300, R



### 三.DataMatrix格式二维码生成

1.生成普通二维码

```java
/*
* 生成一个300*300内容为“二维码内容”的DataMatrix二维码
*/
Bitmap mBitmap = EncodingUtils.createDataMatrix("二维码内容", 300, 300);
```

2.生成带Logo的二维码

```java
//Bitmap形式生成
Bitmap mBitmap = EncodingUtils.createDataMatrix("二维码内容", 300, 300, bitmap);

//资源Id形式生成
Bitmap mBitmap = EncodingUtils.createDataMatrix(this, "二维码内容", 300, 300, R.mipmap.ic_launcher);
```



### 三.识别图中二维码

```java
Expand Down

0 comments on commit 1938f2b

Please sign in to comment.