Skip to content

neutra/AutoScrollLoopViewPager

Repository files navigation

Android Auto Scroll Loop View Pager

Combine from follow libraray to AutoScrollLoopViewPager.jar:

  1. Trinea/AutoScrollViewPager
  • ViewPager which can auto scroll, cycle.

  • ViewPager which can be slided normal in parent ViewPager.

android-auto-scroll-view-pager

  1. imbryk/LoopingViewPager

An android ViewPager extension allowing infinite scrolling.

Usage

<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 is getInterval().
  • startAutoScroll(int) start auto scroll delayed.
  • stopAutoScroll() stop auto scroll.

Setting

  • setInterval(long) set auto scroll time in milliseconds, default is DEFAULT_INTERVAL.
  • setDirection(int) set auto scroll direction, default is RIGHT.
  • 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

About

auto infinite scroll ViewPager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages