+0
Daily
5,675
stars
817
forks
153
watchers
7
prs
80
issues
2
releases
README
InfiniteCycleViewPager
======================
Infinite cycle ViewPager with two-way orientation and interactive effect.
U can check the sample app here.
Warn
====
This library is not more supported.
If you want to add new feature or fix a bug, grab source code and do it.
If you think your fix or feature would be useful to other developers,
I can add link of your repository to this README file.
Thank you for using our libraries.
Download
========
You can download a .aar from GitHub's releases page.
Or use Gradle:
groovy
compile 'com.github.devlight:infinitecycleviewpager:1.0.2'
Or Maven:
groovy
com.github.devlight
infinitecycleviewpager
1.0.2
pom
Or Ivy:
groovy
Android SDK Version
===================
InfiniteCycleViewPager requires a minimum SDK version of 11.
Sample
======
Parameters
For InfiniteCycleViewPager you can set such parameters as:
- min scale:
allows you to set the minimum scale of left and right bottom pages.
- max scale:
allows you to set the maximum scale of center top page.
- min scale offset:
allows you to set offset from edge to minimum scaled pages.
- center scale offset:
allows you to set offset from center when two pages appears.
- model selected icon:
allows you to set selected icon when current model is active.
- medium scaled:
allows you to set is scaling would be min - max or min - medium - max.
- scroll duration:
allows you to set snap scrolling duration.
- scroll interpolator:
allows you to set snap scrolling interpolator.
- page transform listener:
allows you to set page transform listener.
- auto scroll:
allows you to set auto scroll in positive and negative directions.
Tips
Two-way widget need a lot of memory.
Infinite scroll available when item count more then 2.
You can set vertical or horizontal infinite cycle ViewPager.
Init
Check out in code init:
java
// final VerticalInfiniteCycleViewPager infiniteCycleViewPager =
// (VerticalInfiniteCycleViewPager) view.findViewById(R.id.vicvp);
final HorizontalInfiniteCycleViewPager infiniteCycleViewPager =
(HorizontalInfiniteCycleViewPager) view.findViewById(R.id.hicvp);
infiniteCycleViewPager.setAdapter(...);
infiniteCycleViewPager.setScrollDuration(500);
infiniteCycleViewPager.setInterpolator(...);
infiniteCycleViewPager.setMediumScaled(true);
infiniteCycleViewPager.setMaxPageScale(0.8F);
infiniteCycleViewPager.setMinPageScale(0.5F);
infiniteCycleViewPager.setCenterPageScaleOffset(30.0F);
infiniteCycleViewPager.setMinPageScaleOffset(5.0F);
infiniteCycleViewPager.setOnInfiniteCyclePageTransformListener(...);
If you want to get itTop issues
#66Very slow rendering with dynamic data14 comments · 2018-03-28#20Disappearing fragments in HorizontalInfiniteCycleViewPager11 comments · 2016-09-27#25fragment Disappearing9 comments · 2016-10-25#50Is there a way to show 5 items at same time in a screen?6 comments · 2017-07-05#31Use InfiniteCycleViewPager cause ANR onmeasure too long6 comments · 2016-12-04#21When i use inside fragment get Error6 comments · 2016-09-28#35If I use LibraryObject length of less than four,the page will missing4 comments · 2017-01-30#26HorizontalInfiniteCycleViewPager.setCurrentItem() not working4 comments · 2016-11-01
Latest release
Auto scroll, disabled scroll block 1.0.2 2016-08-31Fixes. Bounds visibility fixed. Auto scroll.