Skip to content

Commit

Permalink
Merge pull request #131 from daniel-stoneuk/master
Browse files Browse the repository at this point in the history
Fix #124 & Possible fix #130
  • Loading branch information
heinrichreimer committed Sep 11, 2016
2 parents fd9f568 + bf8115c commit c68005f
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,15 @@ private void smoothScrollPagerTo(final int position) {
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
pager.endFakeDrag();
if (pager.isFakeDragging())
pager.endFakeDrag();
pager.setCurrentItem(position);
}

@Override
public void onAnimationCancel(Animator animation) {
pager.endFakeDrag();
if (pager.isFakeDragging())
pager.endFakeDrag();
}
});
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
Expand Down Expand Up @@ -1059,7 +1061,7 @@ public boolean isButtonBackVisible() {

@SuppressWarnings("unused")
public void setButtonBackVisible(boolean visible) {
buttonBack.setVisibility(visible ? View.VISIBLE : View.GONE);
buttonBack.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
}

@SuppressWarnings("unused")
Expand All @@ -1069,7 +1071,7 @@ public boolean isButtonNextVisible() {

@SuppressWarnings("unused")
public void setButtonNextVisible(boolean visible) {
buttonNext.setVisibility(visible ? View.VISIBLE : View.GONE);
buttonNext.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
}

@SuppressWarnings("unused")
Expand Down

0 comments on commit c68005f

Please sign in to comment.