CustomViewIndicator

Introduction: An Android ViewPager indicator that allows you to provide custom views for display
More: Author   ReportBugs   
Tags:

An Android ViewPager indicator that allows you to provide custom views for display. We used this during a new feature we built, figured it might be useful for someone else along the line!

Usage

Define the CustomViewPageIndicator in your layout file:

<org.buffer.android.customviewindicator.CustomViewPageIndicator
    android:id="@+id/view_indicator"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    app:selectedItem="0"
    app:itemRightMargin="8dp"
    app:itemleftMargin="8dp" />

Assign a list of views to the CustomViewPageIndicator

pageIndicator.indicatorViews = listOf(customViews)

Attach the CustomViewPageIndicator to a ViewPager instance:

pageIndicator.attachToViewPager(viewPager)
Support Me
Apps
About Me
Google+: Trinea trinea
GitHub: Trinea