diff --git a/README.md b/README.md index a6b5844..23eaee8 100644 --- a/README.md +++ b/README.md @@ -24,29 +24,27 @@ viewPager.setAdapter(wrappedAdapter); ``` -### Gradle build +### Installation -To install the demo application to your device run the following task: +To use the library in your project add the following to your project `build.gradle`: -``` -$ ./gradlew installDebug -``` - -To deploy the library to your local Maven repository run the following task: - -``` -$ ./gradlew install +```groovy +dependencies { + compile 'com.github.antonyt:InfiniteViewPager:v1.0.0' +} ``` -Then, to use the library in your project add the following to your `build.gradle`: - +And add JitPack repository into your root `build.gradle`: ```groovy -dependencies { - compile 'com.antonyt.infiniteviewpager:library:1.0.0' +allprojects { + repositories { + ... + maven { url "https://jitpack.io" } + } } ``` Wrapped scrolling should now be possible with your `ViewPager`. The pages you see are not duplicates - each page from your `PagerAdapter` is only created once and then reused. This means you do not have to worry about managing multiple instances of the same `Fragment`. ## Caveats -It is only possible to achieve wrapping when you have at least 4 pages. This is because of the way the `ViewPager` creates, destroys, and displays the pages. No fix for the general case has been found. \ No newline at end of file +It is only possible to achieve wrapping when you have at least 4 pages. This is because of the way the `ViewPager` creates, destroys, and displays the pages. No fix for the general case has been found.