Merge "Don't let ScrollView intercept touch events if it can't scroll." into jb-mr1-dev

This commit is contained in:
Adam Powell
2012-07-31 16:41:37 -07:00
committed by Android (Google) Code Review

View File

@@ -460,6 +460,13 @@ public class ScrollView extends FrameLayout {
return true;
}
/*
* Don't try to intercept touch if we can't scroll anyway.
*/
if (getScrollY() == 0 && !canScrollVertically(1)) {
return false;
}
switch (action & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_MOVE: {
/*