Skip to content
Alexander Vlasov edited this page Nov 11, 2016 · 8 revisions

First, add gradle dependency into your build.gradle:

dependencies {
    compile 'com.cleveroad:slidingtutorial:1.0.6'
}

Then the only thing you need is to add a tutorial fragment via FragmentManager.

final TutorialFragment tutorialFragment = TutorialFragment.newInstance(tutorialOptions);
getFragmentManager()
	.beginTransaction()
	.replace(R.id.container, tutorialFragment)
	.commit();

If you're using support fragments, here you go:

final TutorialSupportFragment tutorialFragment = TutorialSupportFragment.newInstance(tutorialOptions);
getSupportFragmentManager()
	.beginTransaction()
	.replace(R.id.container, tutorialFragment)
	.commit();

What is tutorialOptions variable? It's an instance of TutorialOptions class that holds all settings of your tutorial. See Configuring your tutorial with TutorialOptions for more details.