Skip to content

Commit 35a7458

Browse files
committed
v1.0.4 released
1 parent 46235d0 commit 35a7458

File tree

6 files changed

+172
-1
lines changed

6 files changed

+172
-1
lines changed

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/markdown-navigator.xml

Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ public class MainActivity extends TutorialActivity {
2424
.setDrawable(R.drawable.ss_1) // int top drawable
2525
.setSummary("This is summary")
2626
.build());
27+
// Permission Step
28+
addFragment(new PermissionStep.Builder().setTitle(getString(R.string.permission_title))
29+
.setContent(getString(R.string.permission_detail))
30+
.setBackgroundColor(Color.parseColor("#FF0957"))
31+
.setDrawable(R.drawable.ss_1)
32+
.setSummary(getString(R.string.continue_and_learn))
33+
.setPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE})
34+
.build());
2735
}
2836
}
2937

@@ -36,6 +44,8 @@ setPrevText(text); // Previous button text
3644
setNextText(text); // Next button text
3745
setFinishText(text); // Finish button text
3846
setCancelText(text); // Cancel button text
47+
setIndicatorSelected(int drawable); // Indicator drawable when selected
48+
setIndicator(int drawable); // Indicator drawable
3949

4050
```
4151

@@ -71,7 +81,7 @@ Add it in your root build.gradle at the end of repositories:
7181
```groovy
7282
7383
dependencies {
74-
compile 'com.github.msayan:tutorial-view:v1.0.3'
84+
compile 'com.github.msayan:tutorial-view:v1.0.4'
7585
}
7686
7787
```
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
package com.hololo.tutorial.library;
2+
3+
import android.os.Build;
4+
import android.os.Parcelable;
5+
import android.support.annotation.RequiresApi;
6+
7+
@RequiresApi(api = Build.VERSION_CODES.M)
8+
public class PermissionStep extends Step implements Parcelable {
9+
10+
private String[] permissions;
11+
12+
public String[] getPermissions() {
13+
return permissions;
14+
}
15+
16+
public static class Builder {
17+
18+
private PermissionStep step;
19+
20+
public Builder() {
21+
step = new PermissionStep();
22+
}
23+
24+
public PermissionStep build() {
25+
return step;
26+
}
27+
28+
public Builder setTitle(String title) {
29+
step.setTitle(title);
30+
return this;
31+
}
32+
33+
public Builder setContent(String content) {
34+
step.setContent(content);
35+
return this;
36+
}
37+
38+
public Builder setSummary(String summary) {
39+
step.setSummary(summary);
40+
return this;
41+
}
42+
43+
public Builder setDrawable(int drawable) {
44+
step.setDrawable(drawable);
45+
return this;
46+
}
47+
48+
public Builder setBackgroundColor(int backgroundColor) {
49+
step.setBackgroundColor(backgroundColor);
50+
return this;
51+
}
52+
53+
public Builder setPermissions(String[] permissions) {
54+
step.permissions = permissions;
55+
return this;
56+
}
57+
}
58+
59+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.hololo.tutorial.library;
2+
3+
import android.os.Bundle;
4+
import android.support.annotation.Nullable;
5+
import android.support.v4.app.Fragment;
6+
7+
public class StepView extends Fragment {
8+
9+
Step step;
10+
11+
@Override
12+
public void onCreate(@Nullable Bundle savedInstanceState) {
13+
super.onCreate(savedInstanceState);
14+
15+
step = getArguments().getParcelable("step");
16+
}
17+
}

0 commit comments

Comments
 (0)