diff --git a/library/src/main/java/jarvis/com/library/NestedTouchScrollingLayout.java b/library/src/main/java/jarvis/com/library/NestedTouchScrollingLayout.java index 1acd119..45b86ce 100644 --- a/library/src/main/java/jarvis/com/library/NestedTouchScrollingLayout.java +++ b/library/src/main/java/jarvis/com/library/NestedTouchScrollingLayout.java @@ -254,11 +254,13 @@ public boolean onTouchEvent(MotionEvent event) { if (!isHoldTouch && isChildCanScroll(event, deltaY)) { setSheetTranslation(maxSheetTranslation); - MotionEvent downEvent = MotionEvent.obtain(event); - downEvent.setAction(MotionEvent.ACTION_DOWN); - getChildAt(0).dispatchTouchEvent(downEvent); - downEvent.recycle(); isHoldTouch = true; + if (!(event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_CANCEL)) { + MotionEvent downEvent = MotionEvent.obtain(event); + downEvent.setAction(MotionEvent.ACTION_DOWN); + getChildAt(0).dispatchTouchEvent(downEvent); + downEvent.recycle(); + } } if (isHoldTouch) {