Fill in README extra attrs section

pull/1/head
Dylan McIntyre 8 years ago
parent 561121609c
commit 210218c893
  1. 47
      README.md
  2. 4
      demo/src/main/res/layout/activity_main.xml

@ -13,6 +13,10 @@ Try out all the unique features using the CameraKit Demo from the Google Play st
- [Setup](#setup) - [Setup](#setup)
- [Usage](#usage) - [Usage](#usage)
- [Extra Attributes](#extra-attributes) - [Extra Attributes](#extra-attributes)
- [`ckCropOutput`](#ckCropOutput)
- [`ckFacing`](#ckFacing)
- [`ckFlash`](#ckFlash)
- [`ckPictureMode`](#ckPictureMode)
- [Capturing Images](#capturing-images) - [Capturing Images](#capturing-images)
- [Capturing Video](#capturing-video) - [Capturing Video](#capturing-video)
- [Automatic Permissions Behavior](#automatic-permissions-behavior) - [Automatic Permissions Behavior](#automatic-permissions-behavior)
@ -68,7 +72,48 @@ protected void onPause() {
### Extra Attributes ### Extra Attributes
Extra attributes ```xml
<com.flurgle.camerakit.CameraView xmlns:camerakit="http://schemas.android.com/apk/res-auto"
android:id="@+id/camera"
android:layout_width="match_parent"
android:layout_height="match_parent"
camerakit:ckCropOutput="true"
camerakit:ckFacing="back"
camerakit:ckFlash="off"
camerakit:ckPictureMode="quality" />
```
#### `ckCropOutput`
| Value | Description |
| --------------| -------------|
| `true` | Crop the output image or video to only contain what can be seen on the `CameraView` preview. |
| `false` | Output the full image or video regardless of what is visible on the `CameraView` preview. |
#### `ckFacing`
| Value | Description |
| --------------| -------------|
| `back` | Default `CameraView` preview to back camera. |
| `front` | Default `CameraView` preview to front camera. |
#### `ckFlash`
| Value | Description |
| --------------| -------------|
| `off` | Default `CameraView` flash to off. |
| `on` | Default `CameraView` flash to on. |
| `auto` | Default `CameraView` flash to automatic. |
#### `ckPictureMode`
| Value | Description |
| --------------| -------------|
| `quality` | Use normal Android Camera API image capturing. |
| `speed` | Freeze the `CameraView` preview and grab a `Bitmap` of the frame. |
| `auto` | Default picture mode to `quality`, but fallback to `speed` if capturing is determined to be too slow. |
### Capturing images ### Capturing images

@ -19,7 +19,9 @@
android:layout_height="400dp" android:layout_height="400dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
app:ckCropOutput="true" app:ckCropOutput="true"
app:ckFacing="back" /> app:ckFacing="back"
app:ckFlash="off"
app:ckPictureMode="quality" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

Loading…
Cancel
Save