Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock. Originally based on Patrik Ã…kerfeldt's ViewFlow.
When using the ViewPager widget it is not always obvious to the user that there are adjacent views they can navigate to. By implementing this widget you provide a clear indicator that there exists additional content which they can click or swipe to see.
At present there are five styles of indicators which can be used:
Title IndicatorDisplays the title of the selected page in the center with the titles of the adjacent pages (if available) in a more subtle style. |
![]() |
Tab IndicatorSimilar to the title indicator but displays as many titles as possible in scrolling and animated horizontal tabs. |
![]() |
Circle IndicatorSimple indication of the number of pages available in the pager with a separate drawing style for the currently selected page. |
![]() |
Line IndicatorSimilar to the circle indicator but draws very a very subtle line for each page with a separate drawaing style for the current page. |
|
Underline IndicatorMimics the indicator on the Ice Cream Sandwich application launcher with a fading line the moves with each page. |
Version 2.3.1 — 2012-05-19
Change Log
LinePageIndicator! Draws small indicators lines much like the circle indicator but much more subtle.UnderlinePageIndicator! Acts like the indicator on the Ice Cream Sandwich application launcher.android:orientation rather than custom attribute.getPageTitle(int) method introduced in the r6 version of the support library.android:textSize and android:textColor in its styles.Looking for an older version? Check here.
ViewPager it represents.
<com.viewpagerindicator.TitlePageIndicator android:id="@+id/titles" android:layout_height="wrap_content" android:layout_width="fill_parent" />
onCreate method (or onCreateView for a fragment), bind the indicator to the ViewPager.
//Set the pager with an adapter ViewPager pager = (ViewPager)findViewById(R.id.pager); pager.setAdapter(new TestAdapter(getSupportFragmentManager())); //Bind the title indicator to the adapter TitlePageIndicator titleIndicator = (TitlePageIndicator)findViewById(R.id.titles); titleIndicator.setViewPager(pager);Note: If you are using
TitlePageIndicator your adapter must implement TitleProvider.
//continued from above titleIndicator.setOnPageChangeListener(mPageChangeListener);
For more examples please take a look at the source code to the samples.



Beautiful set of Widgets containing clock widget, clock and weather widget, weather widgets, date widgets and toggle widgets with skins/themes support! Now with more widgets and layouts!
FriendCaster for Facebook gives you the best Facebook experience on Android devices!
Manage the progress of (re-)watching your favorite TV shows. Keep track of which episodes you still have to watch or which ones are upcoming.
Ride Metra is an easy to use and beautiful transit app that provides Metra train schedules, station locations and directions, nearby stations, upcoming departures, Metra service advisory alerts and the ability to search for a Metra rail line or station.
Traktoid, a trakt client.
Mobile interface to the world's largest source for information on craft beer: RateBeer.
Get the latest pictures from NASA's Astronomy Picture of the Day (APOD) and set them as your homescreen wallpaper.
Simple application which turns small notes into pleasing status bar notifications with fancy high quality icons. All your notes are easily accessible so you never forget all those important appointments ever again.
Simplistic application that allows the user to view the most recent (university-approved) going-ons at Bowling Green State University.
Is your app missing?
Contact Jake Wharton or fork the project, update this page, and send a pull request!
Hint: It's in the gh-pages branch.
© 2011 Jake Wharton — @JakeWharton · +JakeWharton
Developed and distributed under the Apache License, Version 2.0.
Originally based on widgets developed by Patrik Ã…kerfeldt.
