Skip to content

BlackDizel/recyclerview-dotsindicator

Repository files navigation

recyclerview-dotsindicator

simple dots indicator for recycler view items

jitpack

library on jitpack website

To install the library add:

repositories { 
     jcenter()
     maven { url "https://jitpack.io" }
}
	dependencies {
         compile 'com.github.BlackDizel:recyclerview-dotsindicator:1.0.3'
 }

Usage

   
   //init
   
   RecyclerView rvItems;
   
   ViewDotsIndicator viewDotsIndicator;
   
   void init(){
	viewDotsIndicator = findViewById(R.id.someId); //just add org.byters.dotsindicator.ViewDotsIndicator to layout
	viewDotsIndicator.init(rvItems);
   }
   
   void update(){ //call only then need to change dots num
	viewDotsIndicator.updateData(3, 0); //where 3 is new dots num, and 0 is selected position
   }
   

To custom drawables, use attrs app:drawableSelected and app:drawableBackground

Result

About

simple dots indicator for recycler view items

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages