explaingit

romandanylyk/pageindicatorview

4,628JavaAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A small Android library that adds animated dot indicators to swipeable screens, showing users which page they are on and how many pages exist in total.

Mindmap

mindmap
  root((pageindicatorview))
    What it does
      Dot page indicators
      9 animation styles
      Auto tracks ViewPager
    Tech stack
      Java
      Android
      ViewPager
    Use cases
      Onboarding screens
      Image galleries
      Tutorial flows
    Setup
      One-line dependency
      XML attributes
      API level 14 plus
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add dot page indicators to an Android app with swipeable onboarding or tutorial screens

USE CASE 2

Choose from nine animation styles, worm, drop, swap, scale, and more, to match an app's look

USE CASE 3

Connect the indicator to a ViewPager with one XML attribute so it tracks page changes automatically

USE CASE 4

Handle a dynamic page count that changes at runtime without writing extra update logic

Tech stack

JavaAndroidViewPager

Getting it running

Difficulty · easy Time to first run · 5min

Add one line to build.gradle dependencies, place an XML tag in your layout, no other configuration required.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

PageIndicatorView is a small Android library that adds the row of dots (or similar markers) you typically see at the bottom of a swipeable screen. Those dots tell you which page you are currently on and how many pages exist in total. The library is designed for Android's ViewPager, which is the built-in component developers use to create left-right swipeable screens inside an app. The library supports nine distinct animation styles for the dots when the user swipes between pages. Options range from a simple color change or a size scale effect, to more visual ones like a worm shape that stretches between dots, a drop animation, or a swap. Developers pick the style that best fits their app's look, and all styles have been available since early versions of the library. Adding the library to an Android project requires a one-line entry in the project's dependency list. Once added, the indicator can be placed in a layout file using an XML tag, and a handful of attributes let you set colors, sizes, padding, and the animation style. You can also point the indicator directly at a ViewPager so it automatically tracks page changes without any extra code. An optional dynamic count setting means the dots update automatically if the number of pages changes at runtime. For situations where automatic ViewPager linking is not practical, such as when the pager sits inside a scrolling list of items, the README recommends setting the selected dot manually through a simple page-change callback. The library requires Android API level 14 or above, which covers virtually all Android devices still in use. The project is licensed under the Apache 2.0 license and is maintained by Roman Danylyk. Release notes are published on the GitHub releases page.

Copy-paste prompts

Prompt 1
I am adding PageIndicatorView to my Android app. Show me how to declare it in a layout XML file, connect it to a ViewPager, and set the worm animation style.
Prompt 2
How do I update the selected dot in PageIndicatorView manually when the ViewPager is inside a RecyclerView and automatic tracking is not practical?
Prompt 3
Write an Android layout XML snippet using PageIndicatorView with custom dot colors, 10dp size, and a scale animation style.
Open on GitHub → Explain another repo

← romandanylyk on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.