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

Commit 52ef4282 authored by Timi Rautamäki's avatar Timi Rautamäki
Browse files

Gallery2: add deadzone for video scroll gestures

Make the top 1/4 of the screen not respond to brightness/volume/seek
gestures, to allow dragging down statusbar without changing them.
Also increase the gesture treshold.

Change-Id: Ibc4241071dc3bf6702cec191c72751829c779ea8
parent 0745df0c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import android.view.GestureDetector;
import android.view.MotionEvent;

public class GestureController {
    private static final int GESTURE_THRESHOLD = 20;
    private static final int GESTURE_THRESHOLD = 40;
    private GestureDetector mGestureDetector;
    private GestureControlListener mGestureControlListener;

+4 −4
Original line number Diff line number Diff line
@@ -168,13 +168,13 @@ public class GestureControllerOverlay extends FrameLayout implements

    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        if (changed && mGestureController != null) {
            mGestureController.setRect(left, top, right, bottom);
        }

        int h = bottom - top;
        int w = right - left;

        if (changed && mGestureController != null) {
            mGestureController.setRect(left, top + h / 4, right, bottom);
        }

        if (mCurrentIndicator != null) {
            layoutCenteredView(mCurrentIndicator, 0, 0, w, h);
        }