Skip to content

Commit

Permalink
fix: make focus slider first in the preview dialog, harder to miss
Browse files Browse the repository at this point in the history
  • Loading branch information
feelfreelinux committed Jul 14, 2024
1 parent ed15936 commit 87637d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions app/app/src/main/java/com/octo4a/camera/CameraService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ class CameraService : LifecycleService(), MJpegFrameProvider {
if (_cameraSettings.manualAF) {
ext.setCaptureRequestOption(
CaptureRequest.CONTROL_AF_MODE, CameraMetadata.CONTROL_AF_MODE_OFF)
ext.setCaptureRequestOption(
CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_CANCEL)
ext.setCaptureRequestOption(
CaptureRequest.LENS_FOCUS_DISTANCE, _cameraSettings.manualAFValue)
}
Expand Down
10 changes: 5 additions & 5 deletions app/app/src/main/res/layout/dialog_camera_preview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
app:implementationMode="compatible"
android:layout_height="280dp"
android:id="@+id/previewView"/>
<com.google.android.material.slider.Slider
android:layout_marginHorizontal="8dp"
android:id="@+id/manualFocusSlider"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
Expand All @@ -30,9 +35,4 @@
android:text="@string/camera_preview_manual_af">
</TextView>
</LinearLayout>
<com.google.android.material.slider.Slider
android:layout_marginHorizontal="8dp"
android:id="@+id/manualFocusSlider"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>

0 comments on commit 87637d4

Please sign in to comment.