You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,10 @@ Any other customization you want can come directly from your layout file. My exa
73
73
74
74
### Animating the layouts
75
75
76
+
<palign="center">
77
+
<imgsrc="artwork/animation.gif">
78
+
</p>
79
+
76
80
In my examples, as well as my own usage of this library, I like to provide subtle animations the first time that a user views a `TutorialPage`. If they were to go backwards in the tutorial, then return to a page for a second time, I do not show the animation again. If you would like to animate your pages in this way, you can override the `TutorialPage#animateLayout` function.
77
81
78
82
```kotlin
@@ -95,9 +99,9 @@ If you would rather animate the `View` every time the page is shown, you could o
95
99
96
100
Sometimes, you may need to have some state in your tutorial. If you are using the tutorial to log in a user, for example, you will probably need the calling `Activity` to know if the login was successful or not.
97
101
98
-
For an example of how to provide an `Activity` result from your `TutorialPage`, please see the [SelectionDialogExample](sample-kotlin/src/main/java/xyz/klinker/floating-tutorial/examples/SelectionDialogExample.kt).
102
+
For an example of how to provide an `Activity` result from your `TutorialPage`, please see the [SelectionDialogExample](sample-kotlin/src/main/java/xyz/klinker/floating_tutorial/examples/SelectionDialogExample.kt).
99
103
100
-
Other times, you may need to know the result of the previous page, to display the UI for the next page. In the [RateItExample](sample-kotlin/src/main/java/xyz/klinker/floating-tutorial/examples/RateItExample.kt), the first page asks the user to give a thumbs up or thumbs down.
104
+
Other times, you may need to know the result of the previous page, to display the UI for the next page. In the [RateItExample](sample-kotlin/src/main/java/xyz/klinker/floating_tutorial/examples/RateItExample.kt), the first page asks the user to give a thumbs up or thumbs down.
101
105
102
106
* If the user selects thumbs down, the second page will ask them if they want to provide feedback.
103
107
* If the user selects thumbs up, the second page will ask them if they want to rate the app on the Play Store.
@@ -108,11 +112,11 @@ This is a good example of the need to communicate the previous page's result to
108
112
109
113
The sample app comes with a few different examples, highlighting different functionality:
110
114
111
-
*[SimpleDialogExample](sample-kotlin/src/main/java/xyz/klinker/floating-tutorial/examples/SimpleDialogExample.kt): a quick and nice looking replacement for an alert dialog, if you want it. This demonstrates a single page and some of the animation capabilites.
112
-
*[SelectionDialogExample](sample-kotlin/src/main/java/xyz/klinker/floating-tutorial/examples/SelectionDialogExample.kt): this demonstrates a selection process. It will provide the selection result as the `Activity` result.
113
-
*[FeatureWalkthroughExample](sample-kotlin/src/main/java/xyz/klinker/floating-tutorial/examples/FeatureWalkthroughExample.kt): this is a simple feature tutorial that could be used anywhere in your apps. It also demonstrates changing the background color and providing multiple pages.
114
-
*[RateItExample](sample-kotlin/src/main/java/xyz/klinker/floating-tutorial/examples/RateItExample.kt): as discussed above, this example demonstrates passing data between the current and the previous page and manipulating the page, based on that data.
115
-
*[PulseSmsPurchaseExample](sample-kotlin/src/main/java/xyz/klinker/floating-tutorial/examples/PulseSmsPurchaseExample.kt): this demonstrates one way that I have used the `floating-tutorial` in [Pulse SMS](https://play.google.com/store/apps/details?id=xyz.klinker.messenger). It demonstrates more complex layouts and animations, as well as an `Activity` result.
115
+
*[SimpleDialogExample](sample-kotlin/src/main/java/xyz/klinker/floating_tutorial/examples/SimpleDialogExample.kt): a quick and nice looking replacement for an alert dialog, if you want it. This demonstrates a single page and some of the animation capabilites.
116
+
*[SelectionDialogExample](sample-kotlin/src/main/java/xyz/klinker/floating_tutorial/examples/SelectionDialogExample.kt): this demonstrates a selection process. It will provide the selection result as the `Activity` result.
117
+
*[FeatureWalkthroughExample](sample-kotlin/src/main/java/xyz/klinker/floating_tutorial/examples/FeatureWalkthroughExample.kt): this is a simple feature tutorial that could be used anywhere in your apps. It also demonstrates changing the background color and providing multiple pages.
118
+
*[RateItExample](sample-kotlin/src/main/java/xyz/klinker/floating_tutorial/examples/RateItExample.kt): as discussed above, this example demonstrates passing data between the current and the previous page and manipulating the page, based on that data.
119
+
*[PulseSmsPurchaseExample](sample-kotlin/src/main/java/xyz/klinker/floating_tutorial/examples/PulseSmsPurchaseExample.kt): this demonstrates one way that I have used the `floating-tutorial` in [Pulse SMS](https://play.google.com/store/apps/details?id=xyz.klinker.messenger). It demonstrates more complex layouts and animations, as well as an `Activity` result.
Copy file name to clipboardExpand all lines: README_JAVA.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,8 @@ Any other customization you want can come directly from your layout file. My exa
63
63
64
64
### Animating the layouts
65
65
66
+

67
+
66
68
In my examples, as well as my own usage of this library, I like to provide subtle animations the first time that a user views a `TutorialPage`. If they were to go backwards in the tutorial, then return to a page for a second time, I do not show the animation again. If you would like to animate your pages in this way, you can override the `TutorialPage#animateLayout` function.
67
69
68
70
```java
@@ -86,9 +88,9 @@ If you would rather animate the `View` every time the page is shown, you could o
86
88
87
89
Sometimes, you may need to have some state in your tutorial. If you are using the tutorial to log in a user, for example, you will probably need the calling `Activity` to know if the login was successful or not.
88
90
89
-
For an example of how to provide an `Activity` result from your `TutorialPage`, please see the [SelectionDialogExample](sample-java/src/main/java/xyz/klinker/floating-tutorial/examples/SelectionDialogExample.java).
91
+
For an example of how to provide an `Activity` result from your `TutorialPage`, please see the [SelectionDialogExample](sample-java/src/main/java/xyz/klinker/floating_tutorial/examples/SelectionDialogExample.java).
90
92
91
-
Other times, you may need to know the result of the previous page, to display the UI for the next page. In the [RateItExample](sample-java/src/main/java/xyz/klinker/floating-tutorial/examples/RateItExample.java), the first page asks the user to give a thumbs up or thumbs down.
93
+
Other times, you may need to know the result of the previous page, to display the UI for the next page. In the [RateItExample](sample-java/src/main/java/xyz/klinker/floating_tutorial/examples/RateItExample.java), the first page asks the user to give a thumbs up or thumbs down.
92
94
93
95
* If the user selects thumbs down, the second page will ask them if they want to provide feedback.
94
96
* If the user selects thumbs up, the second page will ask them if they want to rate the app on the Play Store.
@@ -99,11 +101,11 @@ This is a good example of the need to communicate the previous page's result to
99
101
100
102
The sample app comes with a few different examples, highlighting different functionality:
101
103
102
-
*[SimpleDialogExample](sample-java/src/main/java/xyz/klinker/floating-tutorial/examples/SimpleDialogExample.java): a quick and nice looking replacement for an alert dialog, if you want it. This demonstrates a single page and some of the animation capabilites.
103
-
*[SelectionDialogExample](sample-java/src/main/java/xyz/klinker/floating-tutorial/examples/SelectionDialogExample.java): this demonstrates a selection process. It will provide the selection result as the `Activity` result.
104
-
*[FeatureWalkthroughExample](sample-java/src/main/java/xyz/klinker/floating-tutorial/examples/FeatureWalkthroughExample.java): this is a simple feature tutorial that could be used anywhere in your apps. It also demonstrates changing the background color and providing multiple pages.
105
-
*[RateItExample](sample-java/src/main/java/xyz/klinker/floating-tutorial/examples/RateItExample.java): as discussed above, this example demonstrates passing data between the current and the previous page and manipulating the page, based on that data.
106
-
*[PulseSmsPurchaseExample](sample-java/src/main/java/xyz/klinker/floating-tutorial/examples/PulseSmsPurchaseExample.java): this demonstrates one way that I have used the `floating-tutorial` in [Pulse SMS](https://play.google.com/store/apps/details?id=xyz.klinker.messenger). It demonstrates more complex layouts and animations, as well as an `Activity` result.
104
+
*[SimpleDialogExample](sample-java/src/main/java/xyz/klinker/floating_tutorial/examples/SimpleDialogExample.java): a quick and nice looking replacement for an alert dialog, if you want it. This demonstrates a single page and some of the animation capabilites.
105
+
*[SelectionDialogExample](sample-java/src/main/java/xyz/klinker/floating_tutorial/examples/SelectionDialogExample.java): this demonstrates a selection process. It will provide the selection result as the `Activity` result.
106
+
*[FeatureWalkthroughExample](sample-java/src/main/java/xyz/klinker/floating_tutorial/examples/FeatureWalkthroughExample.java): this is a simple feature tutorial that could be used anywhere in your apps. It also demonstrates changing the background color and providing multiple pages.
107
+
*[RateItExample](sample-java/src/main/java/xyz/klinker/floating_tutorial/examples/RateItExample.java): as discussed above, this example demonstrates passing data between the current and the previous page and manipulating the page, based on that data.
108
+
*[PulseSmsPurchaseExample](sample-java/src/main/java/xyz/klinker/floating_tutorial/examples/PulseSmsPurchaseExample.java): this demonstrates one way that I have used the `floating-tutorial` in [Pulse SMS](https://play.google.com/store/apps/details?id=xyz.klinker.messenger). It demonstrates more complex layouts and animations, as well as an `Activity` result.
0 commit comments