Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trinea/android-auto-scroll-view-pager
Android auto scroll viewpager or viewpager in viewpager
https://github.com/trinea/android-auto-scroll-view-pager
Last synced: about 1 month ago
JSON representation
Android auto scroll viewpager or viewpager in viewpager
- Host: GitHub
- URL: https://github.com/trinea/android-auto-scroll-view-pager
- Owner: Trinea
- License: apache-2.0
- Created: 2014-02-23T16:06:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-02-16T14:09:13.000Z (over 4 years ago)
- Last Synced: 2024-10-09T14:40:34.733Z (about 1 month ago)
- Language: Java
- Homepage: http://p.codekk.com/
- Size: 436 KB
- Stars: 1,669
- Watchers: 86
- Forks: 670
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Android Auto Scroll ViewPager
==============================
ViewPager which can auto scrolling, cycling, decelerating.
ViewPager which can be slided normal in parent ViewPager.**Attention: This library is too old and only supports android-support lib, It's deprecated now. The latest Kotlin and AndroidX support version can use https://github.com/pzienowicz/androidx-auto-scroll-view-pager, Thanks to pzienowicz for giving it a new life.**
### Dev Tools App
The Dev Tools App is a powerful android development tool that can help you improve efficiency greatly, It can be used to view the latest open source projects, view activity history, view manifest, decompile, color picker, extract apk or so, view app info, open or close the options in the developer options quickly, and more.
You can download it from **[DevTools@Google Play](https://play.google.com/store/apps/details?id=cn.trinea.android.developertools)**.
![](https://lh3.googleusercontent.com/ERb20Y50r3u_tZMMlqpH5cnS_MC_n366WoKvEjJyFfHz6d-EwvhaEUf7ZKAgRajboTWR=w720-h440-rw)中文介绍见: [Android自动滚动 轮播循环的ViewPager](http://www.trinea.cn/android/auto-scroll-view-pager/)
![android-auto-scroll-view-pager](http://farm3.staticflickr.com/2843/12805132475_e595664a81_o.gif)## Sample Application
DownloadDemo File: [AutoScrollViewPagerSingleDemo.java](https://github.com/Trinea/android-demo/blob/master/src/cn/trinea/android/demo/AutoScrollViewPagerDemo.java)
Demo Project: [android-demo](https://github.com/Trinea/android-demo)## Usage
- include this library, use``` xml
```
replace
``` xml```
- `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`.
- `setCycle(boolean)` set whether automatic cycle when auto scroll reaching the last or first item, default is true.
- `setScrollDurationFactor(double)` set the factor by which the duration of sliding animation will change.
- `setSlideBorderMode(int)` set how to process when sliding at the last or first item, default is `SLIDE_BORDER_MODE_NONE`.
- `setStopScrollWhenTouch(boolean)` set whether stop auto scroll when touching, default is true.
- `setBorderAnimation(boolean)` set whether animating when auto scroll at the last or first item, default is true.
- You cannot combine with [ViewPagerIndicator](https://github.com/JakeWharton/Android-ViewPagerIndicator) if `setCycle(true)`.
- If you want infinite loop, please see [AutoScrollViewPagerSingleDemo.java](https://github.com/Trinea/android-demo/blob/master/src/cn/trinea/android/demo/AutoScrollViewPagerDemo.java)
**More:** http://www.trinea.cn/android/auto-scroll-view-pager/## Proguard
``` xml
-keep class cn.trinea.android.** { *; }
-keepclassmembers class cn.trinea.android.** { *; }
-dontwarn cn.trinea.android.**
```## Download
Maven:
``` xmlcn.trinea.android.view.autoscrollviewpager
android-auto-scroll-view-pager
1.1.2```
Gradle:
``` xml
compile ('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
exclude module: 'support-v4'
}
```## About Me
Author of [Android Dev Tools App](https://play.google.com/store/apps/details?id=cn.trinea.android.developertools)
- [trinea@twitter](https://twitter.com/trinea_cn)
- [trinea@weibo](http://weibo.com/trinea)
- [trinea.cn](http://www.trinea.cn/)
- [trinea.cn#gmail.com](mailto:[email protected])## License
Copyright 2014 trinea.cn
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.