Skip to content
This repository was archived by the owner on Jun 19, 2021. It is now read-only.

Commit 42b0517

Browse files
committed
Check whether skip or done button must be shown initially
This fixes #25, where the done button isn't shown if only one TutorialItem is used.
1 parent e0acf46 commit 42b0517

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

materialhelptutorial/src/main/java/za/co/riggaroo/materialhelptutorial/tutorial/MaterialTutorialPresenter.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ public void loadViewPagerFragments(List<TutorialItem> tutorialItems) {
4040
fragments.add(helpTutorialImageFragment);
4141
}
4242
tutorialView.setViewPagerFragments(fragments);
43+
44+
if (tutorialItems.size() == 1) {
45+
tutorialView.showDoneButton();
46+
} else {
47+
tutorialView.showSkipButton();
48+
}
4349
}
4450

4551
@Override

0 commit comments

Comments
 (0)