Detailed View:
http://uisource.com/project/auto-scroll-view-pager/
The sample code can be seen:
Https://github.com/Trinea/android-demo/blob/master/src/cn/trinea/android/demo/AutoScrollViewPagerDemo.java
Use:
1. Introduction of Library
2. Call:
① Layout definition
< cn . Trinea.android.view.autoscrollviewpager.AutoScrollViewPager android:id= "@+id/view_pager" android:layout_width= "Match_parent" android:layout_height= "Wrap_ Content "/>
Instead of the general Viewpager definition
② Start Viewpager Auto-scroll
// Start automatic scrolling // Stop automatic scrolling
3. Setting
SetInterval (Long)//set the interval between automatic scrolling in millisecondsSetdirection (int)//sets the direction of automatic scrolling by default to the rightSetcycle (Boolean)//whether to automatically cycle the carousel, the default is TrueSetscrolldurationfactor (Double)//sets the magnification of the Viewpager sliding animation interval to slow the animation or change the animation speedSetstopscrollwhentouch (Boolean)//whether to stop auto-scrolling when the finger touches the Viewpager, the default is TrueSetslidebordermode (int)//Swipe to handle the first or last item, support No action, carousel, and pass to Parent view three modesSetborderanimation (Boolean)//Sets whether animation is required to scroll from edge to next when looping scrolling, by default true
4. Other
① indicator, round or square indicator please use with Viewpagerindicator
② Infinite Loop, if you want to continue playing the first sheet instead of returning to the first one in the last sheet, please refer to Autoscrollviewpagersingledemo.java, note that this feature cannot be used with Viewpagerindicator
Picture Auto scrolling, loop play Android Auto-scroll-view-pager (reprint)