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 {
5
5
mavenCentral()
6
6
}
7
7
dependencies {
8
- classpath ' com.android.tools.build:gradle:2.1 .0'
8
+ classpath ' com.android.tools.build:gradle:2.2 .0'
9
9
10
10
// NOTE: Do not place your application dependencies here; they belong
11
11
// in the individual module build.gradle files
Original file line number Diff line number Diff line change @@ -161,7 +161,6 @@ private void ensureTarget() {
161
161
162
162
@ Override
163
163
public boolean onInterceptTouchEvent (MotionEvent ev ) {
164
-
165
164
if (!isEnabled () || canChildScrollUp () || mRefreshing ) {
166
165
return false ;
167
166
}
@@ -180,7 +179,14 @@ public boolean onInterceptTouchEvent(MotionEvent ev) {
180
179
mInitialMotionY = initialMotionY ;
181
180
break ;
182
181
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 ;
184
190
if (yDiff > mTouchSlop && !mIsBeingDragged ) {
185
191
mIsBeingDragged = true ;
186
192
}
You can’t perform that action at this time.
0 commit comments