Merge "Ignore QS touches if scrolling is not possible."
This commit is contained in:
committed by
Android (Google) Code Review
commit
44dbca0999
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user