Skip to content

Commit

Permalink
* [android] fix wrong behavior with slider.index
Browse files Browse the repository at this point in the history
  • Loading branch information
misakuo committed Nov 25, 2016
1 parent 0b2a377 commit c59ae39
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ public void setIndex(int index) {
if(index >= mAdapter.getRealCount() || index < 0){
return;
}
index = index + mAdapter.getFirst();
mViewPager.setCurrentItem(index);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public int getRealPosition(int shadowPosition) {

public int getFirst() {
if (needLoop) {
return getRealCount();
return getRealCount() + 1;
} else {
return 0;
}
Expand Down

0 comments on commit c59ae39

Please sign in to comment.