Don't let ScrollView intercept touch events if it can't scroll.

Bug 6872104

Change-Id: Iee643e052acc37485a8ec45b7af8be0783fb1a95
This commit is contained in:
Adam Powell
2012-07-31 16:39:32 -07:00
parent 9dcfff205e
commit 0278c2fcba

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: {
/*