Skip to content

Commit 808f8b1

Browse files
committed
README.md added,
Back press bug fixed,
1 parent 08adcef commit 808f8b1

File tree

5 files changed

+107
-7
lines changed

5 files changed

+107
-7
lines changed

README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
[![](https://jitpack.io/#msayan/tutorial-view.svg)](https://jitpack.io/#msayan/tutorial-view)
2+
3+
# Tutorial View
4+
5+
Ready to use tutorial screen.
6+
7+
![sample_video](assets/sample.gif)
8+
9+
## Usage
10+
11+
Extend your activity from TutorialActivity and Add fragments in onCreate after super call
12+
13+
```java
14+
15+
public class MainActivity extends TutorialActivity {
16+
17+
@Override
18+
protected void onCreate(Bundle savedInstanceState) {
19+
super.onCreate(savedInstanceState);
20+
21+
addFragment(new Step.Builder().setTitle("This is header")
22+
.setContent("This is content")
23+
.setBackgroundColor(Color.parseColor("#FF0957")) // int background color
24+
.setDrawable(R.drawable.ss_1) // int top drawable
25+
.setSummary("This is summary")
26+
.build());
27+
}
28+
}
29+
30+
```
31+
32+
## Download
33+
34+
### Step 1. Add the JitPack repository to your build file
35+
36+
Add it in your root build.gradle at the end of repositories:
37+
38+
```groovy
39+
40+
allprojects {
41+
repositories {
42+
...
43+
maven { url 'https://jitpack.io' }
44+
}
45+
}
46+
```
47+
48+
### Step 2. Add the dependency
49+
50+
```groovy
51+
52+
dependencies {
53+
compile 'com.github.msayan:tutorial-view:v1.0.0'
54+
}
55+
56+
```
57+
58+
## License
59+
60+
MIT License
61+
62+
Copyright (c) 2017 Mehmet Ayan
63+
64+
Permission is hereby granted, free of charge, to any person obtaining a copy
65+
of this software and associated documentation files (the "Software"), to deal
66+
in the Software without restriction, including without limitation the rights
67+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
68+
copies of the Software, and to permit persons to whom the Software is
69+
furnished to do so, subject to the following conditions:
70+
71+
The above copyright notice and this permission notice shall be included in all
72+
copies or substantial portions of the Software.
73+
74+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
75+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
76+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
77+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
78+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
79+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
80+
SOFTWARE.

app/src/main/java/com/hololo/tutorial/sample/MainActivity.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@ public class MainActivity extends TutorialActivity {
1212
protected void onCreate(Bundle savedInstanceState) {
1313
super.onCreate(savedInstanceState);
1414

15-
addFragment(new Step.Builder().setTitle("Otomatik Veri").setContent("GM Müzik Çalar şarkıcı/albüm resimlerini, tarzlarını otomatik olarak bulur ve gösterir.* \n\n(*) Bu özelliğin doğru çalışabilmesi için şarkı bilgilerinin düzgün olması gereklidir").setBackgroundColor(Color.parseColor("#FF0957")).setDrawable(R.drawable.ss_1).setSummary("Devam ederek nasıl yapacağınızı öğrenin").build());
16-
17-
addFragment(new Step.Builder().setTitle("Şarkıyı Seç").setContent("Şarkılarınızın listelendiği ana sekmeye geçin her şarkının yanındaki (⋮) dokunun ve açılan menüden Veri Düzenle'yi seçin").setBackgroundColor(Color.parseColor("#00D4BA")).setDrawable(R.drawable.ss_2).setSummary("Devam ederek nasıl güncelleyeceğinizi öğrenin").build());
18-
19-
addFragment(new Step.Builder().setTitle("Verileri Düzenle").setContent("Açılan pencerede Şarkı/Şarkıcı Adı, Albüm ve Tarz seçenekleri kolayca güncellenebilir").setBackgroundColor(Color.parseColor("#1098FE")).setDrawable(R.drawable.ss_3).setSummary("Devam ederek işlem sonucunu öğrenin").build());
20-
21-
addFragment(new Step.Builder().setTitle("Sonuç Harika!").setContent("Yaptığınız güncelleme sonrası albüm kapağı, sanatçının wiki bilgileri ve tarzlar ekranları harika görünüyor, bu işlemi diğer şarkılarınız için de yapmayı unutmayın").setBackgroundColor(Color.parseColor("#CA70F3")).setDrawable(R.drawable.ss_4).setSummary("Teşekkürler, iyi dinlemeler").build());
15+
addFragment(new Step.Builder().setTitle(getString(R.string.automatic_data)).setContent(getString(R.string.gm_finds_photos)).setBackgroundColor(Color.parseColor("#FF0957")).setDrawable(R.drawable.ss_1).setSummary(getString(R.string.continue_and_learn)).build());
16+
addFragment(new Step.Builder().setTitle(getString(R.string.choose_the_song)).setContent(getString(R.string.swap_to_the_tab)).setBackgroundColor(Color.parseColor("#00D4BA")).setDrawable(R.drawable.ss_2).setSummary(getString(R.string.continue_and_update)).build());
17+
addFragment(new Step.Builder().setTitle(getString(R.string.edit_data)).setContent(getString(R.string.update_easily)).setBackgroundColor(Color.parseColor("#1098FE")).setDrawable(R.drawable.ss_3).setSummary(getString(R.string.continue_and_result)).build());
18+
addFragment(new Step.Builder().setTitle(getString(R.string.result_awesome)).setContent(getString(R.string.after_updating)).setBackgroundColor(Color.parseColor("#CA70F3")).setDrawable(R.drawable.ss_4).setSummary(getString(R.string.thank_you)).build());
2219
}
2320
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
<resources>
22
<string name="app_name">Sample</string>
3+
4+
<string name="automatic_data">Automatic Data</string>
5+
<string name="choose_the_song">Choose the song</string>
6+
<string name="edit_data">Edit Data</string>
7+
<string name="result_awesome">Result is awesome!</string>
8+
<string name="continue_and_learn">Continue and learn how to do</string>
9+
<string name="continue_and_update">Continue and learn how to update</string>
10+
<string name="continue_and_result">Continue and see the result</string>
11+
<string name="thank_you">Thank you, have fun</string>
12+
<string name="gm_finds_photos">GM Music Playlist automatically finds photos and genres of singers and albums and displays it.* (*) Music information data should be in a proper format for this feature to work.</string>
13+
<string name="swap_to_the_tab">Swap to the songs tab and touch the (⋮) sign which located at every songs right side , and choose Update Data</string> <string name="update_easily">You can update Song/Singer Name, Album and Genre data easily</string>
14+
<string name="after_updating">After updating data album cover, wiki information of artist and genre screens looks brilliant, don\'t forget to do this process for the other songs of you</string>
15+
16+
317
</resources>

assets/sample.gif

1.1 MB
Loading

library/src/main/java/com/hololo/tutorial/library/TutorialActivity.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ public void onClick(View v) {
152152

153153
}
154154

155+
@Override
156+
public void onBackPressed() {
157+
if (currentItem == 0) {
158+
super.onBackPressed();
159+
} else {
160+
changeFragment(false);
161+
}
162+
}
163+
155164
@Override
156165
public void onClick(View v) {
157166
if (v.getId() == R.id.next) {

0 commit comments

Comments
 (0)