Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c395fbc authored by Mark Harman's avatar Mark Harman
Browse files

Single handed touch zoom by double tap and drag up/down.

parent a0fa5dbe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ If your device supports focus areas, you can touch the part of the screen you wa
so that it becomes less bright). Double tapping will reset the focus and exposure area.</p>

<p>To zoom, use the slider next to the take photo button, or do a multi-touch "pinch"
gesture. You can also control via the volume keys on your phone or tablet - by default, pressing them will take a
gesture, or a double-tap-drag gesture. You can also control via the volume keys on your phone or tablet - by default, pressing them will take a
photo, but you can change this to zoom in/out from the <a href="#settings">Settings</a>.</p>

<p>You can press the gallery icon to view your photos
+1 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ UPDATED Improved performance for Camera2 API (on Android 12+) for taking photos
UPDATED Improved performance for resuming application with Camera2 API on devices that support
        camera vendor extensions.
UPDATED Double tapping will now cancel focus and metering area.
UPDATED Single handed touch zoom by double tap and drag up/down.
UPDATED Allow some more dialogs to run while still showing camera preview.
UPDATED Support longer exposure time (0.5s) on Samsung Galaxy S devices.
UPDATED OnePlus devices on Android 14+ now default to Camera2 API for new installs.
+8 −2
Original line number Diff line number Diff line
@@ -811,6 +811,7 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu
                if( MyDebug.LOG )
                    Log.d(TAG, "onScale: " + scale_factor);
                // make pinch zoom more sensitive:
                if( touch_was_multitouch )
                    scale_factor = 1.0f + 2.0f*(scale_factor - 1.0f);
                Preview.this.scaleZoom(scale_factor);
            }
@@ -887,9 +888,14 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu
            // the application can handle same as if user had pressed shutter button (needed so that this works
            // correctly in Panorama mode).
            applicationInterface.requestTakePhoto();
            return true;
        }
        if( applicationInterface.getTouchCapturePref() ) {
            // return true to disable double-tap-drag zoom gesture, as we don't want this when using single tap to capture either
            return true;
        }
        return false; // important, so that double-tap-drag zoom gesture works
    }

    private class DoubleTapListener extends GestureDetector.SimpleOnGestureListener {
        @Override