Skip to content
A simple customizable indicator for ViewPagers
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea potential fix for crash Jun 29, 2018
app
gradle/wrapper updated project, version, added background color option Jun 23, 2018
images adding images Aug 31, 2016
indicatorlib confirmed fix for + version number Jun 29, 2018
.gitignore
License.md Create License.md Aug 20, 2016
README.md Update README.md Aug 21, 2017
build.gradle updated project, version, added background color option Jun 23, 2018
gradle.properties initial commit Aug 19, 2016
gradlew initial commit Aug 19, 2016
gradlew.bat initial commit Aug 19, 2016
settings.gradle initial commit Aug 19, 2016

README.md

android-viewpager-indicator

Android Arsenal

alt tag alt tag alt tag

A simple customizable indicator for ViewPagers

Installation:

  1. Add the following to the main project gradle file:
	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
  1. Add this to the module gradle file:
	dependencies {
	        compile 'com.github.ravindu1024:android-viewpager-indicator:1.0.1'
	}

Usage:

  1. add using xml:
    <com.ravindu1024.indicatorlib.ViewPagerIndicator
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal|center_vertical"
        android:id="@+id/pager_indicator"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"/>
  1. Then in code:
    ViewPagerIndicator indicator = (ViewPagerIndicator) findViewById(R.id.pager_indicator);
    indicator.setPager(pager);  //pager - the target ViewPager

NOTE: Changes to the ViewPager pages at runtime will be automatically handled when you call notifyDataSetChanged().

You can’t perform that action at this time.