From 7989399a1279450094c5fbe2e1b4b7452f495b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Pavl=C3=ADk?= Date: Sun, 29 May 2016 20:32:53 +0200 Subject: [PATCH 1/2] Correct the dependency name --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a6b5844..aa44dc3 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,11 @@ Then, to use the library in your project add the following to your `build.gradle ```groovy dependencies { - compile 'com.antonyt.infiniteviewpager:library:1.0.0' + compile 'com.github.antonyt:InfiniteViewPager:v1.0.0' } ``` 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. From 6df7846330856d26524edf3243aea624a6a441e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Pavl=C3=ADk?= Date: Sun, 29 May 2016 20:42:41 +0200 Subject: [PATCH 2/2] Use JitPack, not a local repository in the guide Fixes #31, #35 --- README.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index aa44dc3..23eaee8 100644 --- a/README.md +++ b/README.md @@ -24,21 +24,9 @@ viewPager.setAdapter(wrappedAdapter); ``` -### Gradle build +### Installation -To install the demo application to your device run the following task: - -``` -$ ./gradlew installDebug -``` - -To deploy the library to your local Maven repository run the following task: - -``` -$ ./gradlew install -``` - -Then, to use the library in your project add the following to your `build.gradle`: +To use the library in your project add the following to your project `build.gradle`: ```groovy dependencies { @@ -46,6 +34,16 @@ dependencies { } ``` +And add JitPack repository into your root `build.gradle`: +```groovy +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