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

Commit 44dbca09 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ignore QS touches if scrolling is not possible."

parents 44ba81cc 489c5072
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -51,6 +51,23 @@ public class QSScrollLayout extends NestedScrollView {
        addView(linearLayout);
    }


    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        if (canScrollVertically(1) || canScrollVertically(-1)) {
            return super.onInterceptTouchEvent(ev);
        }
        return false;
    }

    @Override
    public boolean onTouchEvent(MotionEvent ev) {
        if (canScrollVertically(1) || canScrollVertically(-1)) {
            return super.onTouchEvent(ev);
        }
        return false;
    }

    public boolean shouldIntercept(MotionEvent ev) {
        if (ev.getY() > (getBottom() - mFooterHeight)) {
            // Do not intercept touches that are below the divider between QS and the footer.