Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bobekos authored Aug 1, 2018
1 parent d83f56d commit 47fd550
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ implementation 'com.github.bobekos:SimpleBarcodeScanner:x.x.xx'
android:layout_height="match_parent"/>
```

For all supported attributes see the list below (not supported yet)
For all supported attributes see the list below

### Include followin code in your activity or fragment

Expand Down Expand Up @@ -80,24 +80,48 @@ class MainActivity : AppCompatActivity() {

```
.setBarcodeFormats(Barcode.QR_CODE)
//in xml
<com.bobekos.bobek.scanner.BarcodeView
...
custom:setBarcodeFormats="qr_code|pdf417|..."
/>
```

Which barcode format should be detected. Default value is all formats.

```
.setFacing(CameraSource.CAMERA_FACING_BACK)
//in xml
<com.bobekos.bobek.scanner.BarcodeView
...
custom:setFacing="front|back"
/>
```

Set the camera facing. Default value is back facing.

```
.setFlash(false)
//in xml
<com.bobekos.bobek.scanner.BarcodeView
...
custom:setFlash="true|false"
/>
```

Turn on the flash. Default value is false. (Also changeable after the subscription)

```
.setAutoFocus(true)
//in xml
<com.bobekos.bobek.scanner.BarcodeView
...
custom:setAutoFocus="true|false"
/>
```

Enable autofocus. Default value is true.
Expand All @@ -116,12 +140,24 @@ Draw a overlay view over the detected barcode. Default overlay is a white rect.

```
.setBeepSound(true)
//in xml
<com.bobekos.bobek.scanner.BarcodeView
...
custom:setBeepSound="true|false"
/>
```

Play Beep sound at barcode detection. Default value is true. (Also changeable after the subscription)

```
.setVibration(500L)
//in xml
<com.bobekos.bobek.scanner.BarcodeView
...
custom:setVibration="500"
/>
```

Vibrate at barcode detection. Default value is 500ms. (Also changeable after the subscription)
Expand Down

0 comments on commit 47fd550

Please sign in to comment.