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

Commit

Permalink
Added check for if no tutorial items are passed
Browse files Browse the repository at this point in the history
  • Loading branch information
spongebobrf committed Jan 3, 2018
1 parent a64464a commit b55ad9c
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

public class MaterialTutorialActivity extends AppCompatActivity implements MaterialTutorialContract.View {

private static final String TAG = "MaterialTutActivity";
public static final String MATERIAL_TUTORIAL_ARG_TUTORIAL_ITEMS = "tutorial_items";
private static final String TAG = "MaterialTutActivity";
private ViewPager mHelpTutorialViewPager;
private View mRootView;
private TextView mTextViewSkip;
Expand Down Expand Up @@ -63,7 +63,6 @@ protected void onCreate(Bundle savedInstanceState) {
mDoneButton.setOnClickListener(finishTutorialClickListener);



mNextButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand All @@ -73,7 +72,11 @@ public void onClick(View v) {
}
});
List<TutorialItem> tutorialItems = getIntent().getParcelableArrayListExtra(MATERIAL_TUTORIAL_ARG_TUTORIAL_ITEMS);
materialTutorialPresenter.loadViewPagerFragments(tutorialItems);
if (tutorialItems == null) {
showEndTutorial();
} else {
materialTutorialPresenter.loadViewPagerFragments(tutorialItems);
}
}

private void setStatusBarColor() {
Expand Down

0 comments on commit b55ad9c

Please sign in to comment.