ViewPager Dots
This library provides a very small, compact, Kotlin-based implementation for ViewPager dots. The dots can of course be switched out for whatever type of Drawable you wish. The animation can be customized as well.
Dependency
Usage
Your layout would look something like this:
You attach the view pager to the dots indicator in your code:
Customization
Lots of things can be visually customized about the DotsIndicator.
From your layout, here's a list of XML attributes:
app:dot_width
(the width of each individual dot)app:dot_height
(the height of each individual dot)app:dot_margin
(spacing between each dot)app:dot_drawable
(the default icon for each dot)app:dot_drawable_unselected
(defaults todot_drawable
)app:dot_tint
(lets you apply a color tint to the above drawables)app:dots_animator
(the animator when a dot becomes selected)app:dots_animator_reverse
(defaults to reversed version of the above)app:dots_orientation
(orientation of the whole strip; defaults tohorizontal
)app:dots_gravity
(gravity of the whole strip; defaults tocenter
)
You can also apply some basic changes dynamically in your code: