Hi guys,
ViewPagers are an important part of android UI used to view data in form of multiple pages. User can swipe back and forth between these pages to reveal the data. For example the Photo Gallery in Facebook. Everyone is familiar with it right.? user can swipe through the images to see next or previous photo.
ViewPager Indicator comes in handy when you have to show count of pages to the user or the page user is currently on. Mostly used PageIndicators are either the
"CirclrPageIndicator" : Small dots to show the number of pages and the highlighted one to indicate the current page.
Or
"TabStrinp" : Used when there are tabs associated with ViewPager. A thin colored bar indicates the current tab or page selected.

But aaaeeeeee...Whats the fun in using a view which most of the developers had already used.
So let me introduce you with two more ViewPager Indicator which are unique. Which no one have seen. Which are not so common but are pretty cool. ;)
1) FlipBarIndicator / CircleIndicator
FlipBarIndicator : Total no of bars indicates the page count. Bars get flipped with page swipe/change. The highlighted bar indicates the current page. Here is the link to the LibraryProject with a sample to include it in your own project.
CircleIndicator
Not that unique but a lightweight viewpager indicator, the exect replica of nexus 5 launcher. Here is the link to the LibraryProject with a sample to include it in your own project.
And now Its time for our ShowStoper. Our second unique ViewPager Indicator is
2) RubberIndicator

Here is the link to the LibraryProject with a sample to include it in your own project.
In addition to the APIs listed in the table, RubberIndicator also provides a callback listener - OnMoveListener for the user should be notified when the moving animator finished.
Thats all folks. :)
Please comment, share, subscribe and show if you like this article or what can i do to improve.
And Remember : "A Beautiful app, is what everyone wants." :)
ViewPagers are an important part of android UI used to view data in form of multiple pages. User can swipe back and forth between these pages to reveal the data. For example the Photo Gallery in Facebook. Everyone is familiar with it right.? user can swipe through the images to see next or previous photo.
ViewPager Indicator comes in handy when you have to show count of pages to the user or the page user is currently on. Mostly used PageIndicators are either the
"CirclrPageIndicator" : Small dots to show the number of pages and the highlighted one to indicate the current page.
Or
"TabStrinp" : Used when there are tabs associated with ViewPager. A thin colored bar indicates the current tab or page selected.

But aaaeeeeee...Whats the fun in using a view which most of the developers had already used.
So let me introduce you with two more ViewPager Indicator which are unique. Which no one have seen. Which are not so common but are pretty cool. ;)
1) FlipBarIndicator / CircleIndicator
FlipBarIndicator : Total no of bars indicates the page count. Bars get flipped with page swipe/change. The highlighted bar indicates the current page. Here is the link to the LibraryProject with a sample to include it in your own project.
CircleIndicator
Not that unique but a lightweight viewpager indicator, the exect replica of nexus 5 launcher. Here is the link to the LibraryProject with a sample to include it in your own project.
And now Its time for our ShowStoper. Our second unique ViewPager Indicator is
2) RubberIndicator

Here is the link to the LibraryProject with a sample to include it in your own project.
- Designed by Valentyn Khenkin
- Here is the CSS version.
Usage
Introduction
APIs offered by RubberIndicator.| APIs | Usage |
|---|---|
| setCount(int count) | Set the count of indicators |
| setCount(int count, int focusPos) | Set the count and specify the focusing indicator |
| setFocusPosition(int pos) | Set focusing indicator |
| getFocusPosition() | Get focusing indicator |
| moveToLeft() | Move the focusing indicator to left |
| moveToRight() | Move the focusing indicator to right |
In addition to the APIs listed in the table, RubberIndicator also provides a callback listener - OnMoveListener for the user should be notified when the moving animator finished.
public interface OnMoveListener {
void onMovedToLeft();
void onMovedToRight();
}
How to use
Checkout to sample to see how to useRubberIndicator with a GestureDetector.
Please comment, share, subscribe and show if you like this article or what can i do to improve.
And Remember : "A Beautiful app, is what everyone wants." :)
