diff --git a/README.md b/README.md index f90fb890..f5685b04 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ Try out all the unique features using the CameraKit Demo from the Google Play st - [Setup](#setup) - [Usage](#usage) - [Extra Attributes](#extra-attributes) + - [`ckCropOutput`](#ckCropOutput) + - [`ckFacing`](#ckFacing) + - [`ckFlash`](#ckFlash) + - [`ckPictureMode`](#ckPictureMode) - [Capturing Images](#capturing-images) - [Capturing Video](#capturing-video) - [Automatic Permissions Behavior](#automatic-permissions-behavior) @@ -68,7 +72,48 @@ protected void onPause() { ### Extra Attributes -Extra attributes +```xml + +``` + +#### `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 diff --git a/demo/src/main/res/layout/activity_main.xml b/demo/src/main/res/layout/activity_main.xml index 3f567d3c..365b98db 100644 --- a/demo/src/main/res/layout/activity_main.xml +++ b/demo/src/main/res/layout/activity_main.xml @@ -19,7 +19,9 @@ android:layout_height="400dp" android:layout_gravity="center_horizontal" app:ckCropOutput="true" - app:ckFacing="back" /> + app:ckFacing="back" + app:ckFlash="off" + app:ckPictureMode="quality" />