Ignore QS touches if scrolling is not possible.
Bug: 70799330 Test: manually scrolling up and down on QS Change-Id: I932386898ab6259c7f726fcbb5935e8e3b1e1d0a
This commit is contained in:
@@ -49,6 +49,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) {
|
||||
getHitRect(mHitRect);
|
||||
if (!mHitRect.contains((int) ev.getX(), (int) ev.getY())) {
|
||||
|
||||
Reference in New Issue
Block a user