From 4c40d51485c874d7d1937840bdda90a044f5451b Mon Sep 17 00:00:00 2001 From: Mattia Iavarone Date: Mon, 24 Jun 2019 12:24:15 -0500 Subject: [PATCH] Fix changelog and migration guide --- docs/_posts/2018-12-20-changelog.md | 11 ++++++++++- docs/_posts/2018-12-20-v1-migration-guide.md | 13 +++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/_posts/2018-12-20-changelog.md b/docs/_posts/2018-12-20-changelog.md index a554b4f5..0efface3 100644 --- a/docs/_posts/2018-12-20-changelog.md +++ b/docs/_posts/2018-12-20-changelog.md @@ -12,6 +12,14 @@ New versions are released through GitHub, so the reference page is the [GitHub R - Improvement: we now choose a video recording profile that is compatible with the chosen size. Should fix some video recording issues. ([#477][477]) - **Breaking change**: some public classes have been moved to different packages. See [table here](../extra/v1-migration-guide.html#repackaging). ([#482][482]) +- **Breaking change**: the listener methods `onFocusStart` and `onFocusEnd` are now called `onAutoFocusStart` and `onAutoFocusEnd`. ([#484][484]) +- **Breaking change**: the gesture actions `focus` and `focusWithMarker` have been removed and replaced by `autoFocus`, which shows no marker. ([#484][484]) +- New: new API called `setAutoFocusMarker()` lets you choose your own marker. ([#484][484]) + +If you were using `focus`, just switch to `autoFocus`. + +If you were using `focusWithMarker`, you can [add back the old marker](../docs/more-features.html#cameraautofocusmarker). + ### v2.0.0-beta05 @@ -52,4 +60,5 @@ This is the first beta release. For changes with respect to v1, please take a lo [403]: https://github.com/natario1/CameraView/pull/403 [435]: https://github.com/natario1/CameraView/pull/435 [477]: https://github.com/natario1/CameraView/pull/477 -[482]: https://github.com/natario1/CameraView/pull/482 \ No newline at end of file +[482]: https://github.com/natario1/CameraView/pull/482 +[484]: https://github.com/natario1/CameraView/pull/484 \ No newline at end of file diff --git a/docs/_posts/2018-12-20-v1-migration-guide.md b/docs/_posts/2018-12-20-v1-migration-guide.md index f7f5343a..b2f98f7a 100644 --- a/docs/_posts/2018-12-20-v1-migration-guide.md +++ b/docs/_posts/2018-12-20-v1-migration-guide.md @@ -191,6 +191,19 @@ way for the future. These changes are listed below: |`SizeSelectors`|`com.otaliastudios.cameraview`|`com.otaliastudios.cameraview.size`| |`AspectRatio`|`com.otaliastudios.cameraview`|`com.otaliastudios.cameraview.size`| +### AutoFocus changes + +First, the listener methods `onFocusStart` and `onFocusEnd` are now called `onAutoFocusStart` and `onAutoFocusEnd`. + +Secondly, and most importantly, the gesture actions `focus` and `focusWithMarker` have been removed +and replaced by `autoFocus`, which shows no marker. A new API, called `setAutoFocusMarker()`, has been +added and can be used, if needed, to add back the old marker. + +|Old gesture action|New gesture action|Extra steps| +|------------------|------------------|-----------| +|`GestureAction.FOCUS`|`GestureAction.AUTO_FOCUS`|None| +|`GestureAction.FOCUS_WITH_MARKER`|`GestureAction.AUTO_FOCUS`|You can use `app:cameraAutoFocusMarker="@string/cameraview_default_autofocus_marker"` in XML or `cameraView.setAutoFocusMarker(new DefaultAutoFocusMarker())` to use the default marker.| + ### Other improvements & changes - Added `@Nullable` and `@NonNull` annotations pretty much everywhere. This might **break** your Kotlin build.