|
|
|
@ -15,8 +15,8 @@ This lets you emulate typical behaviors in a single line: |
|
|
|
|
|
|
|
|
|
```java |
|
|
|
|
cameraView.mapGesture(Gesture.PINCH, GestureAction.ZOOM); // Pinch to zoom! |
|
|
|
|
cameraView.mapGesture(Gesture.TAP, GestureAction.FOCUS_WITH_MARKER); // Tap to focus! |
|
|
|
|
cameraView.mapGesture(Gesture.LONG_TAP, GestureAction.CAPTURE); // Long tap to shoot! |
|
|
|
|
cameraView.mapGesture(Gesture.TAP, GestureAction.AUTO_FOCUS); // Tap to focus! |
|
|
|
|
cameraView.mapGesture(Gesture.LONG_TAP, GestureAction.TAKE_PICTURE); // Long tap to shoot! |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
Simple as that. There are two things to be noted: |
|
|
|
@ -27,8 +27,8 @@ Simple as that. There are two things to be noted: |
|
|
|
|
|Gesture|Description|Can be mapped to| |
|
|
|
|
|-------------|-----------|----------------| |
|
|
|
|
|`PINCH`|Pinch gesture, typically assigned to the zoom control.|`zoom` `exposureCorrection` `none`| |
|
|
|
|
|`TAP`|Single tap gesture, typically assigned to the focus control.|`focus` `focusWithMarker` `capture` `none`| |
|
|
|
|
|`LONG_TAP`|Long tap gesture.|`focus` `focusWithMarker` `capture` `none`| |
|
|
|
|
|`TAP`|Single tap gesture, typically assigned to the focus control.|`autoFocus` `takePicture` `none`| |
|
|
|
|
|`LONG_TAP`|Long tap gesture.|`autoFocus` `takePicture` `none`| |
|
|
|
|
|`SCROLL_HORIZONTAL`|Horizontal movement gesture.|`zoom` `exposureCorrection` `none`| |
|
|
|
|
|`SCROLL_VERTICAL`|Vertical movement gesture.|`zoom` `exposureCorrection` `none`| |
|
|
|
|
|
|
|
|
@ -37,8 +37,8 @@ Simple as that. There are two things to be noted: |
|
|
|
|
```xml |
|
|
|
|
<com.otaliastudios.cameraview.CameraView |
|
|
|
|
app:cameraGesturePinch="zoom|exposureCorrection|none" |
|
|
|
|
app:cameraGestureTap="focus|focusWithMarker|capture|none" |
|
|
|
|
app:cameraGestureLongTap="focus|focusWithMarker|capture|none" |
|
|
|
|
app:cameraGestureTap="autoFocus|takePicture|none" |
|
|
|
|
app:cameraGestureLongTap="autoFocus|takePicture|none" |
|
|
|
|
app:cameraGestureScrollHorizontal="zoom|exposureCorrection|none" |
|
|
|
|
app:cameraGestureScrollVertical="zoom|exposureCorrection|none"/> |
|
|
|
|
``` |
|
|
|
|