Need help with UltraViewPager?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

5.0K Stars 687 Forks MIT License 87 Commits 57 Opened issues


UltraViewPager is an extension for ViewPager to provide multiple features in a single ViewPager.

Services available


Need anything else?

Contributors list

Attention. This project is not maintained any more !!!




is a ViewPager extension that encapsulates multiple features, mainly to provide a unified solution for multi-page switching scenarios.

Example0 Example1 Example0 Example1

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.


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.


Please find the latest version( 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:

compile ('[email protected]') {
    transitive = true

or grab via Maven:

//pom.xml in maven

Create your own layout using a UltraViewPager:


You can follow my tutorial below on how to use UltraViewPager:

UltraViewPager ultraViewPager = (UltraViewPager)findViewById(;
//initialize UltraPagerAdapter,and add child view to UltraViewPager
PagerAdapter adapter = new UltraPagerAdapter(false);

//initialize built-in indicator ultraViewPager.initIndicator(); //set style of indicators ultraViewPager.getIndicator() .setOrientation(UltraViewPager.Orientation.HORIZONTAL) .setFocusColor(Color.GREEN) .setNormalColor(Color.WHITE) .setRadius((int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 5, getResources().getDisplayMetrics())); //set the alignment ultraViewPager.getIndicator().setGravity(Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM); //construct built-in indicator, and add it to UltraViewPager ultraViewPager.getIndicator().build();

//set an infinite loop ultraViewPager.setInfiniteLoop(true); //enable auto-scroll mode ultraViewPager.setAutoScroll(2000);

For other API reference,see this to read more.


  • How to refresh data? you can refresh data by any one below three method:
    • ultraViewPager.refresh();
    • ultraViewPager.getWrapAdapter().notifyDataSetChanged();
    • mViewPager.getViewPager().getAdapter().notifyDataSetChanged();


Demo Project


Before you open an issue or create a pull request, please read Contributing Guide first.


is available under the MIT license.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.