ViewPager Indicator for android nexus-5 launcher style inspired by the work of JakeWharton Android-ViewPagerIndicator if you're looking for more of a complete set of indicators; circular, vertical, ... etc. you can go there.
You can find a sample working project in the sample folder
-
Include the project in the library folder as a library project in eclipse
-
Add this project to your project dependencies
-
In the layout where you'll use the indicator
3.1. Add xmlns attribute to the root element of your viewxmlns:custom="http://schemas.android.com/apk/res-auto"
3.2. Add the custom view below your view pager, the available attributes are:
radius
that specifies the radius of the circles andcolor
to specify the color of them<com.efoad.views.ViewPagerIndicator android:id="@+id/viewpager_indicator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginBottom="5dp" android:padding="5dp" custom:radius="3dp" custom:color="@android:color/darker_gray" />
-
In your Activity class set the view pager into the ViewPagerIndicatorView
((ViewPagerIndicator)findViewById(R.id.viewpager_indicator)).setViewPager(mPager);
Developed by Eslam Foad [email protected]
Any comments or contributions are welcomed