Skip to content

Commit

Permalink
Merge pull request #89 from DoronK/doron_fixed_issues
Browse files Browse the repository at this point in the history
doron_fixed_issues
  • Loading branch information
lsjwzh committed Apr 30, 2016
2 parents 7619834 + 6274e68 commit cac9a40
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.android.tools.build:gradle:2.1.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Apr 10 15:27:10 PDT 2013
#Wed Apr 27 11:07:47 IDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package com.lsjwzh.widget.recyclerviewpager;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.PointF;
Expand All @@ -19,6 +15,10 @@
import android.view.View;
import android.view.ViewTreeObserver;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

/**
* RecyclerViewPager
*
Expand Down Expand Up @@ -219,6 +219,9 @@ protected void onTargetFound(View targetView, RecyclerView.State state, Action a
}
};
linearSmoothScroller.setTargetPosition(position);
if (position == RecyclerView.NO_POSITION) {
return;
}
getLayoutManager().startSmoothScroll(linearSmoothScroller);
} else {
super.smoothScrollToPosition(position);
Expand Down

0 comments on commit cac9a40

Please sign in to comment.