Fix possible page overflow

This commit is contained in:
mittorn 2018-04-05 22:11:55 +07:00
parent 0d1d899d7c
commit 811de8d4e7

View file

@ -104,8 +104,10 @@ public class XashTutorialActivity extends Activity implements View.OnClickListen
private void controlPosition() private void controlPosition()
{ {
notifyIndicator(); if( currentItem > numPages - 1 )
currentItem = numPages - 1;
notifyIndicator();
if (currentItem == numPages - 1) { if (currentItem == numPages - 1) {
next.setText(finishText); next.setText(finishText);
prev.setText(prevText); prev.setText(prevText);