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

Commit acf5a82

Browse files
committed
Updated Readme and added example usage
1 parent 2af1c61 commit acf5a82

3 files changed

Lines changed: 43 additions & 1 deletion

File tree

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,44 @@
11
# MaterialIntroTutorial
2-
Library demonstrating a material intro tutorial much like the ones on Google Sheets
2+
Android Library demonstrating a material intro tutorial much like the ones on Google Sheets
3+
4+
This library shows a help or introduction tutorial into your application. Its inspired by the one in the Google Sheets Android app.
5+
The help tutorial takes the background colour set for each page and when scrolling between the two pages, the two colours will fade into one another.
6+
7+
8+
# Example Usage
9+
10+
Add the following into your build.gradle:
11+
12+
compile "za.co.riggaroo.materialhelptutorial:material-tutorial:1.0.0"
13+
14+
In your activity, create a list of TutorialItems (set the title, subtitle, background colour and image drawable int). Pass them onto the MaterialTutorialActivity and start the activity for result.
15+
16+
public void loadTutorial() {
17+
Intent mainAct = new Intent(this, MaterialTutorialActivity.class);
18+
mainAct.putParcelableArrayListExtra(MaterialTutorialActivity.MATERIAL_TUTORIAL_ARG_TUTORIAL_ITEMS, getTutorialItems(this));
19+
startActivityForResult(mainAct, REQUEST_CODE);
20+
21+
}
22+
23+
private ArrayList<TutorialItem> getTutorialItems(Context context) {
24+
TutorialItem tutorialItem1 = new TutorialItem(context.getString(R.string.slide_1_african_story_books), context.getString(R.string.slide_1_african_story_books_subtitle),
25+
R.color.slide_1, R.drawable.tut_page_1_front, R.drawable.tut_page_1_background);
26+
27+
...
28+
29+
ArrayList<TutorialItem> tutorialItems = new ArrayList<>();
30+
tutorialItems.add(tutorialItem1);
31+
...
32+
33+
return tutorialItems;
34+
}
35+
36+
You should see a tutorial like below:
37+
![](example-usage.gif)
38+
39+
This library is using the following:
40+
- CirclePageIndicator
41+
- UniversalImageLoader
42+
- Percent Support Library
43+
44+

device-2015-11-10-134837.mp4

3.67 MB
Binary file not shown.

example-usage.gif

2.43 MB
Loading

0 commit comments

Comments
 (0)