rename on to visible for tap to focus

pull/1/head
Dylan McIntyre 8 years ago
parent dc95da7249
commit cc5c5d721c
  1. 2
      README.md
  2. 2
      camerakit/src/main/java/com/flurgle/camerakit/CameraKit.java
  3. 4
      camerakit/src/main/java/com/flurgle/camerakit/CameraView.java
  4. 2
      camerakit/src/main/res/values/attrs.xml

@ -161,7 +161,7 @@ camera.setCameraListener(new CameraListener() {
| Value | Description | | Value | Description |
| --------------| -------------| | --------------| -------------|
| `on` | Tap to focus is enabled and a visible focus circle appears when tapped, similar to the Android built-in camera. | | `visible` | Tap to focus is enabled and a visible focus circle appears when tapped, similar to the Android built-in camera. |
| `invisible` | Tap to focus is enabled, but no focus circle appears. | | `invisible` | Tap to focus is enabled, but no focus circle appears. |
| `off` | Tap to focus is off. | | `off` | Tap to focus is off. |

@ -15,7 +15,7 @@ public class CameraKit {
public static final int PICTURE_MODE_SPEED = 1; public static final int PICTURE_MODE_SPEED = 1;
public static final int PICTURE_MODE_AUTO = 2; public static final int PICTURE_MODE_AUTO = 2;
public static final int TAP_TO_FOCUS_ON = 0; public static final int TAP_TO_FOCUS_VISIBLE = 0;
public static final int TAP_TO_FOCUS_INVISIBLE = 1; public static final int TAP_TO_FOCUS_INVISIBLE = 1;
public static final int TAP_TO_FOCUS_OFF = 2; public static final int TAP_TO_FOCUS_OFF = 2;

@ -49,7 +49,7 @@ public class CameraView extends FrameLayout {
} }
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
@IntDef({TAP_TO_FOCUS_ON, TAP_TO_FOCUS_INVISIBLE, TAP_TO_FOCUS_OFF}) @IntDef({TAP_TO_FOCUS_VISIBLE, TAP_TO_FOCUS_INVISIBLE, TAP_TO_FOCUS_OFF})
@interface TapToFocus { @interface TapToFocus {
} }
@ -105,7 +105,7 @@ public class CameraView extends FrameLayout {
} }
if (attr == R.styleable.CameraView_ckTapToFocus) { if (attr == R.styleable.CameraView_ckTapToFocus) {
mTapToFocus = a.getInteger(R.styleable.CameraView_ckTapToFocus, TAP_TO_FOCUS_ON); mTapToFocus = a.getInteger(R.styleable.CameraView_ckTapToFocus, TAP_TO_FOCUS_VISIBLE);
} }
if (attr == R.styleable.CameraView_android_adjustViewBounds) { if (attr == R.styleable.CameraView_android_adjustViewBounds) {

@ -23,7 +23,7 @@
<attr name="ckCropOutput" format="boolean" /> <attr name="ckCropOutput" format="boolean" />
<attr name="ckTapToFocus" format="enum"> <attr name="ckTapToFocus" format="enum">
<enum name="on" value="0" /> <enum name="visible" value="0" />
<enum name="invisible" value="1" /> <enum name="invisible" value="1" />
<enum name="off" value="2" /> <enum name="off" value="2" />
</attr> </attr>

Loading…
Cancel
Save