diff --git a/README.md b/README.md index bc06979..77ad528 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -Stories -==== +# Stories Stories is a library that shows a horizontal progress like Instagram stories. @@ -7,14 +6,36 @@ This project has been forked and extended from [shts/StoriesProgressView](https: [![](https://jitpack.io/v/teresaholfeld/Stories.svg)](https://jitpack.io/#teresaholfeld/Stories) - + - + The person in these pictures and the pictures in the sample app is [Yui Kobayashi](http://www.keyakizaka46.com/s/k46o/artist/07). -How to Use ----- +## Install + +Add jitpack to your repositories in your root `build.gradle`: + +```groovy +allprojects { + repositories { + ... + maven { url "https://jitpack.io" } + } +} + +``` + +Add the dependency in your app `build.gradle`: + +``` +dependencies { + implementation 'com.github.teresaholfeld:Stories:1.1.0' +} + +``` + +## How to Use To see how a StoriesProgressView can be added to your xml layouts, check the sample project. @@ -68,52 +89,57 @@ public class YourActivity extends AppCompatActivity implements StoriesProgressVi } ``` -Skip and Reverse story ---- +### Skip and reverse the story progress - + ```java storiesProgressView.skip(); storiesProgressView.reverse(); ``` -Pause and Resume story ---- - +### Pause and resume the story progress + + ```java storiesProgressView.pause(); storiesProgressView.resume(); ``` +### Change the color of the progress bar -Install ---- +You can change the foreground color and background color of the +progress bar. -Add it in your root build.gradle at the end of repositories: + -```groovy -allprojects { - repositories { - ... - maven { url "https://jitpack.io" } - } -} - -``` - -Add the dependency +To do this, you can add the attributes to your layout xml: +```xml + + + + + + + ``` -dependencies { - implementation 'com.github.teresaholfeld:Stories:1.0.0' -} -``` -License ---- +## License Modifications: diff --git a/image/progress-color.png b/image/progress-color.png new file mode 100644 index 0000000..5d3c1d3 Binary files /dev/null and b/image/progress-color.png differ