add new attrs to readme

pull/1/head
Dylan McIntyre 8 years ago
parent f0ac87d865
commit 63fe1e6cbf
  1. 68
      README.md
  2. 4
      camerakit/src/main/res/values/attrs.xml

@ -135,8 +135,10 @@ camera.postDelayed(new Runnable() {
camerakit:ckFocus="continuous" camerakit:ckFocus="continuous"
camerakit:ckMethod="standard" camerakit:ckMethod="standard"
camerakit:ckZoom="pinch" camerakit:ckZoom="pinch"
camerakit:ckPermissions="strict"
camerakit:ckCropOutput="true" camerakit:ckCropOutput="true"
camerakit:ckJpegQuality="100" camerakit:ckJpegQuality="100"
camerakit:ckVideoQuality="480p"
android:adjustViewBounds="true" /> android:adjustViewBounds="true" />
``` ```
@ -147,8 +149,10 @@ camera.postDelayed(new Runnable() {
|[`ckFocus`](#ckfocus)|[`off`](#off-1) [`continuous`](#continuous) [`tap`](#tap)|`continuous`| |[`ckFocus`](#ckfocus)|[`off`](#off-1) [`continuous`](#continuous) [`tap`](#tap)|`continuous`|
|[`ckMethod`](#ckmethod)|[`standard`](#standard) [`still`](#still) [`speed`](#speed)|`standard`| |[`ckMethod`](#ckmethod)|[`standard`](#standard) [`still`](#still) [`speed`](#speed)|`standard`|
|[`ckZoom`](#ckzoom)|[`off`](#off-2) [`pinch`](#pinch)|`off`| |[`ckZoom`](#ckzoom)|[`off`](#off-2) [`pinch`](#pinch)|`off`|
|[`ckPermissions`](#ckpermissions)|[`strict`](#strict) [`lazy`](#lazy) [`picture`](#picture`)|`strict`|
|[`ckCropOutput`](#ckcropoutput)|[`true`](#true) [`false`](#false)|`false`| |[`ckCropOutput`](#ckcropoutput)|[`true`](#true) [`false`](#false)|`false`|
|[`ckJpegQuality`](#ckjpegquality)|[`0 <= n <= 100`](#ckjpegquality)|`100`| |[`ckJpegQuality`](#ckjpegquality)|[`0 <= n <= 100`](#ckjpegquality)|`100`|
|[`ckVideoQuality`](#ckvideoquality)|[`max480p`](#max480p) [`max720p`](#max720p) [`max1080p`](#max1080p) [`max2160p`](#max2160p) [`highest`](#highest) [`lowest`](#lowest)|`max480p`|
- - - - - -
@ -263,6 +267,29 @@ cameraView.setZoom(CameraKit.Constants.ZOOM_PINCH);
- - - - - -
### `ckPermissions`
[`strict`](#strict) [`lazy`](#lazy) [`picture`](#picture`)
#### `strict`
```java
cameraView.setPermissions(CameraKit.Constants.PERMISSIONS_STRICT);
```
#### `lazy`
```java
cameraView.setPermissions(CameraKit.Constants.PERMISSIONS_LAZY);
```
#### `picture`
```java
cameraView.setPermissions(CameraKit.Constants.PERMISSIONS_PICTURE);
```
- - -
### `ckCropOutput` ### `ckCropOutput`
[`true`](#true) [`false`](#false) [`true`](#true) [`false`](#false)
@ -288,6 +315,47 @@ cameraView.setJpegQuality(100);
- - - - - -
### `ckVideoQuality`
[`max480p`](#max480p) [`max720p`](#max720p) [`max1080p`](#max1080p) [`max2160p`](#max2160p) [`highest`](#highest) [`lowest`](#lowest)
#### `max480p`
```java
cameraView.setVideoQuality(CameraKit.Constants.VIDEO_QUALITY_480P);
```
#### `max720p`
```java
cameraView.setVideoQuality(CameraKit.Constants.VIDEO_QUALITY_720P);
```
#### `max1080p`
```java
cameraView.setVideoQuality(CameraKit.Constants.VIDEO_QUALITY_1080P);
```
#### `max2160p`
```java
cameraView.setVideoQuality(CameraKit.Constants.VIDEO_QUALITY_2160P);
```
#### `lowest`
```java
cameraView.setVideoQuality(CameraKit.Constants.VIDEO_QUALITY_LOWEST);
```
#### `highest`
```java
cameraView.setVideoQuality(CameraKit.Constants.VIDEO_QUALITY_HIGHEST);
```
- - -
## Automatic Permissions Behavior ## Automatic Permissions Behavior
You can handle permissions yourself in whatever way you want, but if you make a call to `CameraView.start()` without the `android.permission.CAMERA` permission, an exception would normally be thrown and your app would crash. You can handle permissions yourself in whatever way you want, but if you make a call to `CameraView.start()` without the `android.permission.CAMERA` permission, an exception would normally be thrown and your app would crash.

@ -43,6 +43,8 @@
<enum name="picture" value="2" /> <enum name="picture" value="2" />
</attr> </attr>
<attr name="ckJpegQuality" format="integer" />
<attr name="ckVideoQuality" format="enum"> <attr name="ckVideoQuality" format="enum">
<enum name="max480p" value="0" /> <enum name="max480p" value="0" />
<enum name="max720p" value="1" /> <enum name="max720p" value="1" />
@ -52,8 +54,6 @@
<enum name="lowest" value="5" /> <enum name="lowest" value="5" />
</attr> </attr>
<attr name="ckJpegQuality" format="integer" />
<attr name="ckCropOutput" format="boolean" /> <attr name="ckCropOutput" format="boolean" />
<attr name="android:adjustViewBounds" /> <attr name="android:adjustViewBounds" />

Loading…
Cancel
Save