Skip to content

Commit

Permalink
improve the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
klinker24 committed Sep 25, 2017
1 parent 29b995d commit a69b5b6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ This is a simple, easy-to-implement, and highly customizable framework for makin

The goal of this library isn't to confine you to certain UI styles or guidelines that I have made. The goal here is to provide you with a framework that you can build off of yourself. The content of these tutorial pages can be anything you want. That said, I have provided a few examples here, of UIs that have worked well for me and that I think provide a pretty great experience.

*Note: the library itself is in [Kotlin](https://kotlinlang.org/), which is now [native to Android](https://blog.jetbrains.com/kotlin/2017/05/kotlin-on-android-now-official/). I have created sample applications in both* **Kotlin** *and* **Java**. *So, as you go through and figure out how to implement this library, you can use either sample as a reference. They are functionally equivalent.*

*If you would like to see the usage section of this README in* **Java** *please head to the [Java-flavored README](README-JAVA.md).*
> *Note: the library itself is in [Kotlin](https://kotlinlang.org/), which is now [native to Android](https://blog.jetbrains.com/kotlin/2017/05/kotlin-on-android-now-official/). I have created sample applications in both* **Kotlin** *and* **Java**. *The samples are functionally equivalent. If you would like to see the usage section of this README in* **Java** *please head to the [Java-flavored README](README_JAVA.md).*
## Including it in your Project

Expand Down Expand Up @@ -71,7 +69,7 @@ object : TutorialPage(this@SimpleDialogExample) {
})
```

Any other customization you want can come directly from your layout file. My examples show the primary color for the background of the top text. You could do that inside of your layout, if you like that look.
Any other customization can come directly from your layout file. My examples show the primary color for the background of the top text. You could do that inside of your layout, if you like that look.

### Animating the layouts

Expand All @@ -97,15 +95,15 @@ object : TutorialPage(this@SimpleDialogExample) {

If you would rather animate the `View` every time the page is shown, you could override the `TutorialPage#onShown(firstTimeShown: Boolean)` method, instead. If you override that, be sure to call the super class method.

### Providing results from the individual pages, or the entire tutorial
### Providing `TutorialPage` and `Activity` Results

<p align="center">
<img src="artwork/result_data.gif">
</p>

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.
Sometimes, you may need store and provide some kind of state within the tutorial. For example: if you are using the tutorial to log in a user, you will probably need the calling `Activity` to know if the login was successful or not.

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).
Please see the [SelectionDialogExample](sample-kotlin/src/main/java/xyz/klinker/floating_tutorial/examples/SelectionDialogExample.kt) as an example of providing the calling `Activity` the result of your `FloatingTutorialActivity`.

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.

Expand All @@ -130,7 +128,7 @@ Please fork this repository and contribute back using [pull requests](https://gi

## Changelog

The full changelog for the library can be found [here](https://github.com/klinker24/Android-FloatingTutorialActivity/blob/master/CHANGELOG.md).
The full changelog for the library can be found [here](CHANGELOG.md).

## License

Expand Down
10 changes: 5 additions & 5 deletions README_JAVA.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Android Floating Tutorial Activity

This README discusses the usage of the tutorial in **Java** rather than **Kotlin**, which is demonstrated in the [README.md](README.md).
This README discusses the usage of the tutorial in **Java** rather than **Kotlin**. **Kotlin** usage is shown in the [README.md](README.md). The **Java** and **Kotlin** sample apps are functionally equivalent.

## Usage

Expand Down Expand Up @@ -63,7 +63,7 @@ new TutorialPage(context) {
})
```

Any other customization you want can come directly from your layout file. My examples show the primary color for the background of the top text. You could do that inside of your layout, if you like that look.
Any other customization can come directly from your layout file. My examples show the primary color for the background of the top text. You could do that inside of your layout, if you like that look.

### Animating the layouts

Expand All @@ -90,15 +90,15 @@ new TutorialPage(context) {

If you would rather animate the `View` every time the page is shown, you could override the `TutorialPage#onShown(firstTimeShown: Boolean)` method, instead. If you override that, be sure to call the super class method.

### Providing results from the individual pages, or the entire tutorial
### Providing `TutorialPage` and `Activity` Results

<p align="center">
<img src="artwork/result_data.gif">
</p>

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.
Sometimes, you may need store and provide some kind of state within the tutorial. For example: if you are using the tutorial to log in a user, you will probably need the calling `Activity` to know if the login was successful or not.

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).
Please see the [SelectionDialogExample](sample-java/src/main/java/xyz/klinker/floating_tutorial/examples/SelectionDialogExample.java) as an example of providing the calling `Activity` the result of your `FloatingTutorialActivity`.

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.

Expand Down
Binary file added artwork/feature.xcf
Binary file not shown.

0 comments on commit a69b5b6

Please sign in to comment.