A modern and customizable circular progress bar component for Android apps, built using Jetpack Compose and designed for easy XML integration. Add beautiful and animated progress indicators to your Android UI in just a few lines of code.
- 🎯 Jetpack Compose powered circular animation
- 🎨 Gradient color support (start-to-end)
- 🧩 Easy XML and Compose integration
- ⚡ Smooth percentage-based animation
- 💎 Lightweight, reusable, and customizable
Add this to your settings.gradle.kts:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}Add this to your build.gradle.kts:
dependencies {
implementation("com.github.sankalpsaxena04:ProgressbarLibrary:cpb-2.0")
}
@Composable
fun ExampleCircularBar() {
CircularProgressbar(
modifier= Modifier.size(200.dp),
cpbarThickness=8.dp,
completedPercentage= 30.0,
backgroundColor= Color.Transparent,
progressbarGradientColors = listOf(Color(0, 0, 255), Color(0, 255, 0), Color(0, 0, 255)),
percentageVisibility= true,
title="Test",
titleVisibility = true
)
}
Embed it in your existing XML layout:
<com.yourpackage.CircularProgressView
android:id="@+id/progressBar"
android:layout_width="200dp"
android:layout_height="200dp"
app:percentage="0.75"
app:startColor="#FF5722"
app:endColor="#FFC107"
app:strokeWidth="12dp"
app:animationDuration="1000" />
- percentage: sets the progress (0 to 100)
- startColor, endColor: for gradient effect
- strokeWidth: defines the thickness of the progress arc
Full documentation is available in the Release section of this repository.
Found a bug or want a feature? Create an issue or submit a pull request. Contributions are welcome!
Licensed under the MIT License. Free for personal and commercial use.