Skip to content

Commit

Permalink
fixed scroll issue
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey.chernenko committed Mar 14, 2017
1 parent 4fb9261 commit 77a2ddc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.android.tools.build:gradle:2.2.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ private void ensureTarget() {

@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {

if (!isEnabled() || canChildScrollUp() || mRefreshing) {
return false;
}
Expand All @@ -180,7 +179,14 @@ public boolean onInterceptTouchEvent(MotionEvent ev) {
mInitialMotionY = initialMotionY;
break;
case MotionEvent.ACTION_MOVE:
final float yDiff = getMotionEventY(ev, mActivePointerId);
if (mActivePointerId == INVALID_POINTER) {
return false;
}
final float y = getMotionEventY(ev, mActivePointerId);
if (y == -1) {
return false;
}
final float yDiff = y - mInitialMotionY;
if (yDiff > mTouchSlop && !mIsBeingDragged) {
mIsBeingDragged = true;
}
Expand Down

0 comments on commit 77a2ddc

Please sign in to comment.