diff --git a/viewflow/src/org/taptwo/android/widget/ViewFlow.java b/viewflow/src/org/taptwo/android/widget/ViewFlow.java index ad75696..4475e23 100644 --- a/viewflow/src/org/taptwo/android/widget/ViewFlow.java +++ b/viewflow/src/org/taptwo/android/widget/ViewFlow.java @@ -321,6 +321,8 @@ public boolean onTouchEvent(MotionEvent ev) { } if (mTouchState == TOUCH_STATE_SCROLLING) { + if(getParent() != null) + getParent().requestDisallowInterceptTouchEvent(true); // Scroll to follow the motion event final int deltaX = (int) (mLastMotionX - x); mLastMotionX = x; @@ -366,11 +368,14 @@ && mCurrentScreen < getChildCount() - 1) { } mTouchState = TOUCH_STATE_REST; - + if(getParent() != null) + getParent().requestDisallowInterceptTouchEvent(false); break; case MotionEvent.ACTION_CANCEL: snapToDestination(); mTouchState = TOUCH_STATE_REST; + if(getParent() != null) + getParent().requestDisallowInterceptTouchEvent(false); } return true; }