From c1efe7a9b3f531734f75a6e0256843725586c1f9 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 3 Jan 2020 18:17:57 +0100 Subject: [PATCH] Fixed scroll in 3-col mode --- app/src/main/java/eu/faircode/email/DrawerLayoutEx.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/DrawerLayoutEx.java b/app/src/main/java/eu/faircode/email/DrawerLayoutEx.java index 7ba65e15ad..12a347dd61 100644 --- a/app/src/main/java/eu/faircode/email/DrawerLayoutEx.java +++ b/app/src/main/java/eu/faircode/email/DrawerLayoutEx.java @@ -23,6 +23,7 @@ import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; import android.graphics.Color; +import android.graphics.Rect; import android.util.AttributeSet; import android.view.Gravity; import android.view.MotionEvent; @@ -76,6 +77,12 @@ public class DrawerLayoutEx extends DrawerLayout { @Override public boolean onInterceptTouchEvent(final MotionEvent ev) { - return (!isLocked() && super.onInterceptTouchEvent(ev)); + if (isLocked()) { + Rect rect = new Rect(); + getChildAt(1).getHitRect(rect); + if (!rect.contains((int) ev.getX(), (int) ev.getY())) + return false; + } + return super.onInterceptTouchEvent(ev); } }