Combine from follow libraray to AutoScrollLoopViewPager.jar:
- Trinea/AutoScrollViewPager
-
ViewPager which can auto scroll, cycle.
-
ViewPager which can be slided normal in parent ViewPager.
- imbryk/LoopingViewPager
An android ViewPager extension allowing infinite scrolling.
- include AutoScrollLoopViewPager.jar and android-support-v4.jar, use
<io.github.neutra.android.autoscrollloopviewpager.AutoScrollLoopViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
replace
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
startAutoScroll()
start auto scroll, delay time isgetInterval()
.startAutoScroll(int)
start auto scroll delayed.stopAutoScroll()
stop auto scroll.
setInterval(long)
set auto scroll time in milliseconds, default isDEFAULT_INTERVAL
.setDirection(int)
set auto scroll direction, default isRIGHT
.setScrollDurationFactor(double)
set the factor by which the duration of sliding animation will change.setStopScrollWhenTouch(boolean)
set whether stop auto scroll when touching, default is true.- You may need ViewPagerIndicator to implement indicator.
## License