File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
library/src/main/java/com/yalantis/pulltomakesoup Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
55 mavenCentral()
66 }
77 dependencies {
8- classpath ' com.android.tools.build:gradle:2.1 .0'
8+ classpath ' com.android.tools.build:gradle:2.2 .0'
99
1010 // NOTE: Do not place your application dependencies here; they belong
1111 // in the individual module build.gradle files
Original file line number Diff line number Diff line change @@ -161,7 +161,6 @@ private void ensureTarget() {
161161
162162 @ Override
163163 public boolean onInterceptTouchEvent (MotionEvent ev ) {
164-
165164 if (!isEnabled () || canChildScrollUp () || mRefreshing ) {
166165 return false ;
167166 }
@@ -180,7 +179,14 @@ public boolean onInterceptTouchEvent(MotionEvent ev) {
180179 mInitialMotionY = initialMotionY ;
181180 break ;
182181 case MotionEvent .ACTION_MOVE :
183- final float yDiff = getMotionEventY (ev , mActivePointerId );
182+ if (mActivePointerId == INVALID_POINTER ) {
183+ return false ;
184+ }
185+ final float y = getMotionEventY (ev , mActivePointerId );
186+ if (y == -1 ) {
187+ return false ;
188+ }
189+ final float yDiff = y - mInitialMotionY ;
184190 if (yDiff > mTouchSlop && !mIsBeingDragged ) {
185191 mIsBeingDragged = true ;
186192 }
You can’t perform that action at this time.
0 commit comments