Skip to content

Commit 28d81ec

Browse files
author
alexey_zalevskyi_cr
committed
Initial commit.
1 parent 1cb12e1 commit 28d81ec

File tree

4 files changed

+63
-25
lines changed

4 files changed

+63
-25
lines changed

README.md

Lines changed: 59 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,92 @@
1+
### Setup ###
2+
To use BlurTutorial add dependency to your project:
3+
```groovy
4+
implementation 'com.cleveroad.blur_tutorial:blur_tutorial:1.0.1'
5+
```
6+
7+
18
### Usage ###
29
#### BlurTutorial ####
310
The main component of library is the <b>BlurTutorial</b> interface.
411

512
```kotlin
6-
// add list of states to tutorial
13+
/*
14+
Add list of states to tutorial.
15+
*/
716
fun addAllStates(states: List<TutorialState>)
817

9-
// add one state to tutorial
18+
/*
19+
Add one state to tutorial.
20+
*/
1021
fun addState(state: TutorialState)
1122

12-
// add one state to position
23+
/*
24+
Add one state by position.
25+
*/
1326
fun setState(state: TutorialState, index: Int)
1427

15-
// remove state from tutorial
28+
/*
29+
Remove state from tutorial.
30+
*/
1631
fun removeState(state: TutorialState)
1732

18-
// clear all states of tutorial. Cancel tutorial process.
33+
/*
34+
Clear all states of tutorial.
35+
Cancel tutorial process.
36+
*/
1937
fun clearStates()
2038

21-
// get current state of tutorial
39+
/*
40+
Get current state of tutorial.
41+
*/
2242
fun getCurrentState(): TutorialState?
2343

2444
/*
25-
* Start tutorial process.
26-
*
27-
* Should be called in [Activity.onResume] or [Fragment.onResume] or later.
28-
* If you also highlight action bar menu items,
29-
* call it in [Activity.onPrepareOptionsMenu] or [Fragment.onPrepareOptionsMenu] or later.
30-
*/
45+
Start tutorial process.
46+
47+
Should be called in [Activity.onResume] or [Fragment.onResume] or later.
48+
If you also highlight action bar menu items,
49+
call it in [Activity.onPrepareOptionsMenu] or [Fragment.onPrepareOptionsMenu] or later.
50+
*/
3151
fun start()
3252

33-
// go to next state of tutorial. Finish the current state.
53+
/*
54+
Go to next state of tutorial.
55+
Finish the current state.
56+
*/
3457
fun next()
3558

36-
/**
37-
* Interrupt tutorial process.
38-
* It can be renewed by calling next() or start()
39-
*/
59+
/*
60+
Interrupt tutorial process.
61+
It can be renewed by calling next() or start()
62+
*/
4063
fun interrupt()
4164

42-
// change configuration of current [BlurTutorial] instance.
65+
/*
66+
Change configuration of
67+
current [BlurTutorial] instance.
68+
*/
4369
fun configure(): TutorialBuilder
4470

45-
// save state of tutorial. Ypu must call it in onSaveInstanceState() of your Fragment or Activity.
71+
/*
72+
Save state of tutorial.
73+
You must call it in onSaveInstanceState()
74+
of your Fragment or Activity.
75+
*/
4676
fun onSaveInstanceState(outState: Bundle)
4777

48-
// restore state of tutorial. You must call it in onRestoreInstanceState() of your Fragment or Activity.
78+
/*
79+
Restore state of tutorial.
80+
You must call it in onRestoreInstanceState() of
81+
your Fragment or Activity.
82+
*/
4983
fun onRestoreInstanceState(savedState: Bundle?)
5084

51-
// Release resources. You must call it in onDestroy() of Fragment or Activity.
85+
/*
86+
Release resources.
87+
You must call it in onDestroy() of
88+
your Fragment or Activity.
89+
*/
5290
fun onDestroy()
5391
```
5492
#### TutorialState ####

blur_tutorial/lib_jcenter.settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ ext {
55
bintrayName = 'blur-tutorial'
66

77
publishedGroupId = 'com.cleveroad.blur_tutorial'
8-
libraryName = 'blur-tutorial'
9-
artifact = 'blur-tutorial'
8+
libraryName = 'blur_tutorial'
9+
artifact = 'blur_tutorial'
1010

1111
libraryDescription = 'Blur tutorial'
1212
}

gradlew

100644100755
File mode changed.

main_jcenter.settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ext {
2-
libraryVersionCode = 1
3-
libraryVersion = '1.0.0'
2+
libraryVersionCode = 2
3+
libraryVersion = '1.0.1'
44

55
developerId = 'cleveroad'
66
developerName = 'Eugene Altynpara'

0 commit comments

Comments
 (0)