Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 768 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 768 Bytes

ViewPagerIndicator

Android View pager position indicator with different built in shapes.

Installing

Include this project as a module.

Usage

// XML 
<com.company.androidviewpagerindicaor.ViewPagerIndicator
android:id="@+id/viewPagerIndicator"
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
android:layout_gravity="bottom|end" 
app:colorSelected="@color/colorAccent"
app:colorDeselected="@color/colorAccentLight"
app:sizeSelected="10dp"
app:sizeDeselected="10dp"
app:gap="8dp"
app:shape="circle"
android:layout_marginBottom="8dp"/>
// Activity
ViewPagerIndicator pagerIndicator = findViewById(R.id.viewPagerIndicator);
pagerIndicator.attachToViewPager(viewPager);  //viewPager replace with your ViewPager