All Projects → bufferapp → CustomViewIndicator

bufferapp / CustomViewIndicator

Licence: other
An Android ViewPager indicator that allows you to provide custom views for display

Programming Languages

kotlin
9241 projects

Custom View Indicator

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)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].