ProjectUltraViewPager is a ViewPager extension that encapsulates multiple features, mainly to provide a unified solution for multi-page switching scenarios.
Main Feature
support horizontal scrolling and vertical scrolling
support multi views in one viewpager
support switching views circularly. For example, if there are 3 views to display in a ViewPager, it should switch back to the first view after the third view.
support auto-scrolling feature,implemented timer with Handler.
support setting max-height and max-width for this ViewPager.
support setting the aspect ratio for UltraViewPager.
UltraViewPager has a built-in indicator. support circle and icon style.
built-in two kind of page tansition animation.
you can combine multiple features at the same time.
Design
UltraViewPager is a super extension for ViewPager.
It’s actually a RelativeLayout in order to display ViewPager and Indicator.UltraViewPager offers some common method delegate for ViewPager, you can also invoke more method by call getViewPager() and get the actual ViewPager.
In order to achieve vertical scroll, through exchanging MotionEvent in onInterceptTouchEvent and onTouchEvent.For more details, you can read the source code.
Usage
Please find the latest version(1.0.7.7 so far) in maven repository. The newest version has been upload to jcenter and MavenCantral, make sure you have added at least one of these repositories.
Attention. This project is not maintained any more !!!
UltraViewPager
中文文档
Project
UltraViewPageris a ViewPager extension that encapsulates multiple features, mainly to provide a unified solution for multi-page switching scenarios.Main Feature
you can combine multiple features at the same time.
Design
UltraViewPager is a super extension for ViewPager. It’s actually a RelativeLayout in order to display ViewPager and Indicator.UltraViewPager offers some common method delegate for ViewPager, you can also invoke more method by call getViewPager() and get the actual ViewPager.
In order to achieve vertical scroll, through exchanging MotionEvent in onInterceptTouchEvent and onTouchEvent.For more details, you can read the source code.
Usage
Please find the latest version(1.0.7.7 so far) in maven repository. The newest version has been upload to jcenter and MavenCantral, make sure you have added at least one of these repositories.
Using Gradle:
or grab via Maven:
Create your own layout using a UltraViewPager:
activity_pager.xml
You can follow my tutorial below on how to use UltraViewPager:
For other API reference,see this to read more.
FAQ
DEMO
Demo Project
Contributing
Before you open an issue or create a pull request, please read Contributing Guide first.
LICENSE
UltraViewPageris available under the MIT license.