Skip to content

Commit 069db25

Browse files
committed
add sample animation
1 parent b85e532 commit 069db25

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ Any other customization you want can come directly from your layout file. My exa
7373

7474
### Animating the layouts
7575

76+
<p align="center">
77+
<img src="artwork/animation.gif">
78+
</p>
79+
7680
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.
7781

7882
```kotlin
@@ -95,9 +99,9 @@ If you would rather animate the `View` every time the page is shown, you could o
9599

96100
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.
97101

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).
99103

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.
101105

102106
* If the user selects thumbs down, the second page will ask them if they want to provide feedback.
103107
* 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
108112

109113
The sample app comes with a few different examples, highlighting different functionality:
110114

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.
116120

117121
## Contributing
118122

README_JAVA.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Any other customization you want can come directly from your layout file. My exa
6363

6464
### Animating the layouts
6565

66+
![animation](artwork/animation.gif)
67+
6668
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.
6769

6870
```java
@@ -86,9 +88,9 @@ If you would rather animate the `View` every time the page is shown, you could o
8688

8789
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.
8890

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).
9092

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.
9294

9395
* If the user selects thumbs down, the second page will ask them if they want to provide feedback.
9496
* 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
99101

100102
The sample app comes with a few different examples, highlighting different functionality:
101103

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.
107109

108110
## License
109111

artwork/animation.gif

695 KB
Loading

artwork/animation.mp4

2.08 MB
Binary file not shown.

0 commit comments

Comments
 (0)