Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Dotsindicator | 3,041 | 4 months ago | 3 | May 18, 2023 | 31 | apache-2.0 | Kotlin | |||
Three material Dots Indicators for view pagers in Android ! | ||||||||||
Smooth App Bar Layout | 1,775 | 6 years ago | 40 | apache-2.0 | Java | |||||
Smooth version of Google Support Design AppBarLayout | ||||||||||
Androidmaterialdesigntoolbar | 719 | 3 years ago | 1 | Java | ||||||
Android Sample Project with Material Design and Toolbar. | ||||||||||
Material Viewpagerindicator | 465 | 4 years ago | 7 | apache-2.0 | Java | |||||
Dot-based Android ViewPager indicator with Material Design animations. | ||||||||||
Suesnews | 456 | 9 years ago | 6 | mit | Java | |||||
一个符合 Google Material Design 的 Android 校园新闻客户端 | ||||||||||
Pocenter | 309 | 6 years ago | 1 | mit | Java | |||||
整合多个软件外包平台项目信息,替你筛选优质项目。MVP + RxJava + Retrofit + Material Design | ||||||||||
Android Fly Materialdesign | 294 | 4 years ago | Java | |||||||
Android Activity换场动画类 :通用Activity换场动画,高级Activity换场动画 APP打开引导页:图片引导,视频引导 导航菜单类:TabLayout菜单、FragmentTabHost菜单、FragmentTabHost菜单 + ViewPager菜单、菜单拖拉重新排列、可删除 广告轮播类 数据列表类:RecycleView可拖拉重新排列、可删除 Material Design支持库相关效果 日历相关效果:高仿小米日历、年月切换动画、滚动年日历、滚动月日历、左右翻页月日历 | ||||||||||
Seenewsv2 | 275 | 4 years ago | 1 | Java | ||||||
新闻Android客户端 基于Material Design | ||||||||||
Androidessentiallibraries | 227 | a year ago | 3 | mit | Kotlin | |||||
👻 Android Essential Libraries - A couple of the Android Libraries to use in your Projects 🛠 | ||||||||||
React Native Paper Tabs | 151 | 3 | 4 months ago | 17 | August 14, 2023 | 4 | mit | TypeScript | ||
Smooth and fast cross platform Material Design Tabs for React Native Paper |
Dots indicator is an Android library available for Jetpack Compose and XML 🚀
Don't forget to star the project if you like it!
==
Feel free to submit issues and enhancement requests !
repositories {
google()
mavenCentral()
}
dependencies {
implementation("com.tbuonomo:dotsindicator:5.0")
}
Column {
var pageCount by remember { mutableStateOf(5) }
val pagerState = rememberPagerState()
HorizontalPager(
modifier = Modifier.padding(top = 24.dp),
pageCount = pageCount,
contentPadding = PaddingValues(horizontal = 64.dp),
pageSpacing = 24.dp,
state = pagerState
) {
PagePlaceholderItem()
}
DotsIndicator(
dotCount = pageCount,
type = ShiftIndicatorType(dotsGraphic = DotGraphic(color = MaterialTheme.colorScheme.primary)),
pagerState = pagerState
)
}
4 types are available in JetpackCompose
DotsIndicator(
dotCount = pageCount,
type = ShiftIndicatorType(dotsGraphic = DotGraphic(color = MaterialTheme.colorScheme.primary)),
pagerState = pagerState
)
DotsIndicator(
dotCount = pageCount,
type = SpringIndicatorType(
dotsGraphic = DotGraphic(
16.dp,
borderWidth = 2.dp,
borderColor = MaterialTheme.colorScheme.primary,
color = Color.Transparent
),
selectorDotGraphic = DotGraphic(
14.dp,
color = MaterialTheme.colorScheme.primary
)
),
pagerState = pagerState
)
DotsIndicator(
dotCount = pageCount,
type = WormIndicatorType(
dotsGraphic = DotGraphic(
16.dp,
borderWidth = 2.dp,
borderColor = MaterialTheme.colorScheme.primary,
color = Color.Transparent,
),
wormDotGraphic = DotGraphic(
16.dp,
color = MaterialTheme.colorScheme.primary,
)
),
pagerState = pagerState
)
DotsIndicator(
dotCount = pageCount,
type = BalloonIndicatorType(
dotsGraphic = DotGraphic(
color = MaterialTheme.colorScheme.primary,
size = 8.dp
),
balloonSizeFactor = 2f
),
dotSpacing = 20.dp,
pagerState = pagerState
)
<com.tbuonomo.viewpagerdotsindicator.DotsIndicator
android:id="@+id/dots_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:dotsColor="@color/material_white"
app:dotsCornerRadius="8dp"
app:dotsSize="16dp"
app:dotsSpacing="4dp"
app:dotsWidthFactor="2.5"
app:selectedDotColor="@color/md_blue_200"
app:progressMode="true"
/>
Attribute | Description |
---|---|
dotsColor |
Color of the dots |
selectedDotColor |
Color of the selected dot (by default the dotsColor ) |
progressMode |
Lets the selected dot color to the dots behind the current one |
dotsSize |
Size in dp of the dots (by default 16dp) |
dotsSpacing |
Size in dp of the space between the dots (by default 4dp) |
dotsWidthFactor |
The dots scale factor for page indication (by default 2.5) |
dotsCornerRadius |
The dots corner radius (by default the half of dotsSize for circularity) |
val dotsIndicator = findViewById<DotsIndicator>(R.id.dots_indicator)
val viewPager = findViewById<ViewPager>(R.id.view_pager)
val adapter = ViewPagerAdapter()
viewPager.adapter = adapter
dotsIndicator.attachTo(viewPager)
<com.tbuonomo.viewpagerdotsindicator.SpringDotsIndicator
android:id="@+id/spring_dots_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:dampingRatio="0.5"
app:dotsColor="@color/material_white"
app:dotsStrokeColor="@color/material_yellow"
app:dotsCornerRadius="2dp"
app:dotsSize="16dp"
app:dotsSpacing="6dp"
app:dotsStrokeWidth="2dp"
app:stiffness="300"
/>
Attribute | Description |
---|---|
dotsColor |
Color of the indicator dot |
dotsStrokeColor |
Color of the stroke dots (by default the indicator color) |
dotsSize |
Size in dp of the dots (by default 16dp) |
dotsSpacing |
Size in dp of the space between the dots (by default 4dp) |
dotsCornerRadius |
The dots corner radius (by default the half of dotsSize for circularity) |
dotsStrokeWidth |
The dots stroke width (by default 2dp) |
dampingRatio |
The damping ratio of the spring force (by default 0.5) |
stiffness |
The stiffness of the spring force (by default 300) |
val springDotsIndicator = findViewById<SpringDotsIndicator>(R.id.spring_dots_indicator)
val viewPager = findViewById<ViewPager>(R.id.view_pager)
val adapter = ViewPagerAdapter()
viewPager.adapter = adapter
springDotsIndicator.attachTo(viewPager)
<com.tbuonomo.viewpagerdotsindicator.WormDotsIndicator
android:id="@+id/worm_dots_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:dotsColor="@color/material_blueA200"
app:dotsStrokeColor="@color/material_yellow"
app:dotsCornerRadius="8dp"
app:dotsSize="16dp"
app:dotsSpacing="4dp"
app:dotsStrokeWidth="2dp"
/>
Attribute | Description |
---|---|
dotsColor |
Color of the indicator dot |
dotsStrokeColor |
Color of the stroke dots (by default the indicator color) |
dotsSize |
Size in dp of the dots (by default 16dp) |
dotsSpacing |
Size in dp of the space between the dots (by default 4dp) |
dotsCornerRadius |
The dots corner radius (by default the half of dotsSize for circularity) |
dotsStrokeWidth |
The dots stroke width (by default 2dp) |
val wormDotsIndicator = findViewById<WormDotsIndicator>(R.id.worm_dots_indicator)
val viewPager = findViewById<ViewPager>(R.id.view_pager)
val adapter = ViewPagerAdapter()
viewPager.adapter = adapter
wormDotsIndicator.attachTo(viewPager)
The attachTo
can take a ViewPager
or a ViewPager2
If 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.
setViewPager
and setViewPager2
are now deprecated and replaced by attachTo(...)
Fix #115
The library is now on MavenCentral.
The library name moves from com.tbuonomo.andrui:viewpagerdotsindicator
to com.tbuonomo:dotsindicator
Fix crash
selectedDotColor
and progressMode
to DotsIndicator
DotsIndicator
globallydotsStrokeColor
to SpringDotsIndicator
and WormDotsIndicator
Copyright 2016 Tommy Buonomo
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.