Skip to content

Commit cac9a40

Browse files
committed
Merge pull request #89 from DoronK/doron_fixed_issues
doron_fixed_issues
2 parents 7619834 + 6274e68 commit cac9a40

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:1.3.1'
9+
classpath 'com.android.tools.build:gradle:2.1.0'
1010

1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Apr 10 15:27:10 PDT 2013
1+
#Wed Apr 27 11:07:47 IDT 2016
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

lib/src/main/java/com/lsjwzh/widget/recyclerviewpager/RecyclerViewPager.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package com.lsjwzh.widget.recyclerviewpager;
22

3-
import java.lang.reflect.Field;
4-
import java.util.ArrayList;
5-
import java.util.List;
6-
73
import android.content.Context;
84
import android.content.res.TypedArray;
95
import android.graphics.PointF;
@@ -19,6 +15,10 @@
1915
import android.view.View;
2016
import android.view.ViewTreeObserver;
2117

18+
import java.lang.reflect.Field;
19+
import java.util.ArrayList;
20+
import java.util.List;
21+
2222
/**
2323
* RecyclerViewPager
2424
*
@@ -219,6 +219,9 @@ protected void onTargetFound(View targetView, RecyclerView.State state, Action a
219219
}
220220
};
221221
linearSmoothScroller.setTargetPosition(position);
222+
if (position == RecyclerView.NO_POSITION) {
223+
return;
224+
}
222225
getLayoutManager().startSmoothScroll(linearSmoothScroller);
223226
} else {
224227
super.smoothScrollToPosition(position);

0 commit comments

Comments
 (0)