[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7352":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":36,"discoverSource":37},7352,"dotsindicator","tommybuonomo\u002Fdotsindicator","tommybuonomo","Three material Dots Indicators for view pagers in Android !  ","",null,"Kotlin",3599,362,28,25,0,2,29.68,"Apache License 2.0",false,"master",[23,24,25,26,27,28,29,30,31,32],"android","android-library","dots","dots-indicator","indicator","kotlin","kotlin-android","material-design","viewpager","viewpager-indicator","2026-06-12 02:01:38","# Pager Dots Indicator\n\n![Maven Central](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fcom.tbuonomo\u002Fdotsindicator\u002Fbadge.svg)\n[![Android Arsenal]( https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAndroid%20Arsenal-Material%20View%20Pager%20Dots%20Indicator-green.svg?style=flat )]( https:\u002F\u002Fandroid-arsenal.com\u002Fdetails\u002F1\u002F7127 )\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FJStumpp\u002Fawesome-android\">\u003Cimg alt=\"awesome\" src=\"https:\u002F\u002Fcdn.rawgit.com\u002Fsindresorhus\u002Fawesome\u002Fd7305f38d29fed78fa85652e3a63e154dd8e8829\u002Fmedia\u002Fbadge.svg\" \u002F>\u003C\u002Fa>\n\nDots indicator is an Android library available for Jetpack Compose and XML 🚀\n\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fassets\u002F15737675\u002F77651550-3819-4fbf-8528-0d28c95d4d07\" height=\"500\"\u002F>\n\n\nDon't forget to star the project if you like it! \n![star](https:\u002F\u002Fuser-images.githubusercontent.com\u002F15737675\u002F39397370-85f5b294-4afe-11e8-9c02-0dfdf014136a.png)\n == ![heart](https:\u002F\u002Fuser-images.githubusercontent.com\u002F15737675\u002F39397367-6e312c2e-4afe-11e8-9fbf-32001b0165a1.png)\n \nFeel free to submit issues and enhancement requests !\n\n## How to\n#### Gradle\n```Gradle\nrepositories {\n    google()\n    mavenCentral()\n}\n\ndependencies {\n    implementation(\"com.tbuonomo:dotsindicator:5.1.0\")\n}\n\n```\n# For Jetpack Compose\n```Kotlin\nColumn {\n    var pageCount by remember { mutableStateOf(5) }\n    val pagerState = rememberPagerState()\n    HorizontalPager(\n        modifier = Modifier.padding(top = 24.dp),\n        pageCount = pageCount,\n        contentPadding = PaddingValues(horizontal = 64.dp),\n        pageSpacing = 24.dp,\n        state = pagerState\n    ) {\n        PagePlaceholderItem()\n    }\n    DotsIndicator(\n        dotCount = pageCount,\n        type = ShiftIndicatorType(dotsGraphic = DotGraphic(color = MaterialTheme.colorScheme.primary)),\n        pagerState = pagerState\n    )\n}\n```\n\n4 types are available in JetpackCompose\n## ShiftIndicatorType\n![ezgif com-crop (1)](https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fassets\u002F15737675\u002F862d7a67-fb78-4767-b5b2-2244dbdbcf31)\n```Kotlin\nDotsIndicator(\n    dotCount = pageCount,\n    type = ShiftIndicatorType(dotsGraphic = DotGraphic(color = MaterialTheme.colorScheme.primary)),\n    pagerState = pagerState\n)\n```\n\n## SpringIndicatorType\n![ezgif com-crop (2)](https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fassets\u002F15737675\u002F3c421473-4492-408d-a4cd-a29a6c18ba51)\n```Kotlin\nDotsIndicator(\n    dotCount = pageCount,\n    type = SpringIndicatorType(\n        dotsGraphic = DotGraphic(\n            16.dp,\n            borderWidth = 2.dp,\n            borderColor = MaterialTheme.colorScheme.primary,\n            color = Color.Transparent\n        ),\n        selectorDotGraphic = DotGraphic(\n            14.dp,\n            color = MaterialTheme.colorScheme.primary\n        )\n    ),\n    pagerState = pagerState\n)\n```\n\n## WormIndicatorType\n![ezgif com-crop (3)](https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fassets\u002F15737675\u002Ffdfd8ffc-1581-49f7-8bfd-59f2e118bfac)\n```Kotlin\nDotsIndicator(\n    dotCount = pageCount,\n    type = WormIndicatorType(\n        dotsGraphic = DotGraphic(\n            16.dp,\n            borderWidth = 2.dp,\n            borderColor = MaterialTheme.colorScheme.primary,\n            color = Color.Transparent,\n        ),\n        wormDotGraphic = DotGraphic(\n            16.dp,\n            color = MaterialTheme.colorScheme.primary,\n        )\n    ),\n    pagerState = pagerState\n)\n```\n\n## BalloonIndicatorType\n![ezgif com-crop (4)](https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fassets\u002F15737675\u002F0687f413-96d4-44ac-8923-0be73d76e2b0)\n```Kotlin\nDotsIndicator(\n    dotCount = pageCount,\n    type = BalloonIndicatorType(\n        dotsGraphic = DotGraphic(\n            color = MaterialTheme.colorScheme.primary,\n            size = 8.dp\n        ),\n        balloonSizeFactor = 2f\n    ),\n    dotSpacing = 20.dp,\n    pagerState = pagerState\n)\n```\n# For XML\n## DotsIndicator \n![ezgif com-crop 1](https:\u002F\u002Fuser-images.githubusercontent.com\u002F15737675\u002F38328329-e7008c06-384a-11e8-8449-9f2e396d2bc5.gif) ![ezgif com-crop 3](https:\u002F\u002Fuser-images.githubusercontent.com\u002F15737675\u002F38328570-8f1e8230-384b-11e8-9be7-738932a4f85e.gif)\n#### In your XML layout\n```Xml\n\u003Ccom.tbuonomo.viewpagerdotsindicator.DotsIndicator\n    android:id=\"@+id\u002Fdots_indicator\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    app:dotsColor=\"@color\u002Fmaterial_white\"\n    app:dotsCornerRadius=\"8dp\"\n    app:dotsSize=\"16dp\"\n    app:dotsSpacing=\"4dp\"\n    app:dotsWidthFactor=\"2.5\"\n    app:selectedDotColor=\"@color\u002Fmd_blue_200\"\n    app:progressMode=\"true\"\n    \u002F>\n```\n\n#### Custom Attributes\n| Attribute | Description |\n| --- | --- |\n| `dotsColor` | Color of the dots |\n| `selectedDotColor` | Color of the selected dot (by default the `dotsColor`) |\n| `progressMode` | Lets the selected dot color to the dots behind the current one |\n| `dotsSize` | Size in dp of the dots (by default 16dp) |\n| `dotsSpacing` | Size in dp of the space between the dots (by default 4dp) |\n| `dotsWidthFactor` | The dots scale factor for page indication (by default 2.5) |\n| `dotsCornerRadius` | The dots corner radius (by default the half of dotsSize for circularity) |\n\n#### In your Kotlin code\n```Kotlin\n    val dotsIndicator = findViewById\u003CDotsIndicator>(R.id.dots_indicator)\n    val viewPager = findViewById\u003CViewPager>(R.id.view_pager)\n    val adapter = ViewPagerAdapter()\n    viewPager.adapter = adapter\n    dotsIndicator.attachTo(viewPager)\n```\n\n\n## SpringDotsIndicator \n![ezgif com-crop 4](https:\u002F\u002Fuser-images.githubusercontent.com\u002F15737675\u002F38329136-2c470ef0-384d-11e8-88a8-c8719dc1d0b7.gif) ![ezgif com-crop 5](https:\u002F\u002Fuser-images.githubusercontent.com\u002F15737675\u002F38329293-b87f68a4-384d-11e8-8a04-c560c60dac7c.gif)\n#### In your XML layout\n```Xml\n\u003Ccom.tbuonomo.viewpagerdotsindicator.SpringDotsIndicator\n    android:id=\"@+id\u002Fspring_dots_indicator\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    app:dampingRatio=\"0.5\"\n    app:dotsColor=\"@color\u002Fmaterial_white\"\n    app:dotsStrokeColor=\"@color\u002Fmaterial_yellow\"\n    app:dotsCornerRadius=\"2dp\"\n    app:dotsSize=\"16dp\"\n    app:dotsSpacing=\"6dp\"\n    app:dotsStrokeWidth=\"2dp\"\n    app:stiffness=\"300\"\n    \u002F>\n```\n\n#### Custom Attributes\n| Attribute | Description |\n| --- | --- |\n| `dotsColor` | Color of the indicator dot |\n| `dotsStrokeColor` | Color of the stroke dots (by default the indicator color) |\n| `dotsSize` | Size in dp of the dots (by default 16dp) |\n| `dotsSpacing` | Size in dp of the space between the dots (by default 4dp) |\n| `dotsCornerRadius` | The dots corner radius (by default the half of dotsSize for circularity) |\n| `dotsStrokeWidth` | The dots stroke width (by default 2dp) |\n| `dampingRatio` | The damping ratio of the spring force (by default 0.5) |\n| `stiffness` | The stiffness of the spring force (by default 300) |\n\n#### In your Kotlin code\n```Kotlin\n    val springDotsIndicator = findViewById\u003CSpringDotsIndicator>(R.id.spring_dots_indicator)\n    val viewPager = findViewById\u003CViewPager>(R.id.view_pager)\n    val adapter = ViewPagerAdapter()\n    viewPager.adapter = adapter\n    springDotsIndicator.attachTo(viewPager)\n```\n\n\n## WormDotsIndicator \n![ezgif com-crop 6](https:\u002F\u002Fuser-images.githubusercontent.com\u002F15737675\u002F38329969-9cf3de2e-384f-11e8-9ada-fa3fbef04d80.gif) ![ezgif com-crop 7](https:\u002F\u002Fuser-images.githubusercontent.com\u002F15737675\u002F38330079-f35908fc-384f-11e8-85aa-4daf64c73115.gif)\n\n#### In your XML layout\n```Xml\n\u003Ccom.tbuonomo.viewpagerdotsindicator.WormDotsIndicator\n    android:id=\"@+id\u002Fworm_dots_indicator\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    app:dotsColor=\"@color\u002Fmaterial_blueA200\"\n    app:dotsStrokeColor=\"@color\u002Fmaterial_yellow\"\n    app:dotsCornerRadius=\"8dp\"\n    app:dotsSize=\"16dp\"\n    app:dotsSpacing=\"4dp\"\n    app:dotsStrokeWidth=\"2dp\"\n    \u002F>\n```\n\n#### Custom Attributes\n| Attribute | Description |\n| --- | --- |\n| `dotsColor` | Color of the indicator dot |\n| `dotsStrokeColor` | Color of the stroke dots (by default the indicator color) |\n| `dotsSize` | Size in dp of the dots (by default 16dp) |\n| `dotsSpacing` | Size in dp of the space between the dots (by default 4dp) |\n| `dotsCornerRadius` | The dots corner radius (by default the half of dotsSize for circularity) |\n| `dotsStrokeWidth` | The dots stroke width (by default 2dp) |\n\n#### In your Kotlin code\n```Kotlin\n    val wormDotsIndicator = findViewById\u003CWormDotsIndicator>(R.id.worm_dots_indicator)\n    val viewPager = findViewById\u003CViewPager>(R.id.view_pager)\n    val adapter = ViewPagerAdapter()\n    viewPager.adapter = adapter\n    wormDotsIndicator.attachTo(viewPager)\n```\n\n## Support of ViewPager2\nThe `attachTo` can take a `ViewPager` or a `ViewPager2`\n\n## Help Maintenance\nIf you could help me to continue maintain this repo, buying me a cup of coffee will make my life really happy and get much energy out of it.\n\n\u003Ca href=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Ftommybuonomo\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Fassets\u002Fimg\u002Fcustom_images\u002Fpurple_img.png\" alt=\"Buy Me A Coffee\" style=\"height: auto !important;width: auto !important;\" >\u003C\u002Fa>\n\n## Changelog\n### 5.1.0\n- Fix import issues\n- Upgrade AGP versions\n- Migrate repo to Maven Central Repository\n### 5.0\n- Add Jetpack Compose support with 4 types: ShiftIndicatorType, SpringIndicatorType, WormIndicatorType, BalloonIndicatorType\n### 4.3\n- Fix [#144][i144], [#143][i143], [#139][i139], [#135][i135], [#133][i133], [#131][i131], [#126][i126], [#109][i109], [#95][i95], [#93][i93], [#86][i86], [#85][i85], [#80][i80], [#78][i78], [#73][i73], [#68][i68], [#58][i58]\n- Methods `setViewPager` and `setViewPager2` are now deprecated and replaced by `attachTo(...)`\n### 4.2\nFix [#115](https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F115)\nThe library is now on MavenCentral.\nThe library name moves from `com.tbuonomo.andrui:viewpagerdotsindicator` to `com.tbuonomo:dotsindicator`\n### 4.1.2\nFix [#55][i55] and [#56][i56]\n### 4.1.1\nFix crash\n### 4.1\n- Support RTL (fix [#32][i32] and [#51][i51])\n### 4.0\n- Support of ViewPager2 (fix [#40][i40])\n- Convert all the project to Kotlin\n- Migration to AndroidX\n- Fix [#37][i37]: findViewById, causing missing adapter error\n\n### 3.0.3\n- Fix [#20][i20]: Dots indicator initialises with the wrong number of dots initially\n### 3.0.2\n- Add attribute `selectedDotColor` and `progressMode` to `DotsIndicator`\n- Fix RTL issues and improve `DotsIndicator` globally\n### 2.1.0\n- Add attribute `dotsStrokeColor` to `SpringDotsIndicator` and `WormDotsIndicator`\n\n## License\n    Copyright 2016 Tommy Buonomo\n    \n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n    \n        http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n[i20]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F20\n[i32]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F32\n[i37]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F37\n[i40]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F40\n[i51]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F51\n[i55]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F55\n[i56]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F56\n[i20]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F20\n[i32]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F32\n[i37]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F37\n[i40]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F40\n[i51]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F51\n[i55]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F55\n[i56]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F56\n[i144]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F144\n[i143]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F143\n[i139]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F139\n[i135]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F135\n[i133]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F133\n[i131]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F131\n[i126]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F126\n[i109]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F109\n[i95]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F95\n[i93]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F93\n[i86]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F86\n[i85]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F85\n[i80]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F80\n[i78]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F78\n[i73]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F73\n[i68]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F68\n[i58]: https:\u002F\u002Fgithub.com\u002Ftommybuonomo\u002Fdotsindicator\u002Fissues\u002F58\n","DotsIndicator 是一个用于 Android 应用中的视图分页器指示器库，支持 Jetpack Compose 和 XML。它提供了多种类型的点状指示器样式，包括 Shift、Spring 和 Worm 三种动画效果，能够为应用的界面增添美观且直观的导航元素。该库使用 Kotlin 编写，遵循 Material Design 设计规范，易于集成到现有项目中，并且可以自定义颜色和尺寸等属性以匹配不同主题。适用于需要在 ViewPager 或类似组件上添加页面切换视觉反馈的应用场景，如引导页、轮播图等。","2026-06-11 03:11:54","top_language"]