A sleek, animated, floating-point-compatible step-based progress bar for Android.
Now with easy setup using a single config object! 💡
- ✅ Floating Point Support: Progress like
2.5 / 5 - 🔧 Simple Configuration: Use
ProgressViewConfigto apply all customizations - 🎨 Customizable Appearance:
- Bar height & rounded corners
- Filled & unfilled bar colors
- Custom thumb drawable
- Step label suffix, size, font, and color
- 🌀 Smooth Animations on step change
- 🔄 Programmatic Jump with
jumpToStep(step, animated) - 🪝 Step Change Callback with
setOnStepChangeListener
<com.avcoding.discreetprogress.StepProgressBarView
android:id="@+id/stepProgressBar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />Use the new ProgressViewConfig to configure the view easily:
val config = ProgressViewConfig(
totalSteps = 5,
labelSuffix = "m",
labelTextSizeSp = 14f,
labelTextColor = Color.DKGRAY,
barHeightDp = 10,
roundRadius = 6,
thumbDrawable = ContextCompat.getDrawable(this, R.drawable.ic_thumb),
barColor = Pair(Color.BLUE, Color.LTGRAY)
)
stepProgressBar.setUp(config) { step ->
Log.d("StepBar", "Current progress: $step")
}
// Optionally jump to a value
stepProgressBar.jumpToStep(3.5f, animated = true)📦 Installation
Copy the StepProgressBarView.kt and ProgressViewConfig.kt into your project
// settings.gradle
dependencyResolutionManagement {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
// build.gradle
dependencies {
implementation 'com.github.aahanverma00710:StepProgressBarView:1.0'
}
🧑💻 Author
