RoundCornerProgressBar
[Android] Round Corner Progress Bar Library for Android
Install / Use
/learn @akexorcist/RoundCornerProgressBarREADME
RoundCornerProgressBar
Round corner is cool. Let's make your progress bar with round corner

Colorful rounded corner progress bar
Download
Gradle
implementation("com.akexorcist:round-corner-progress-bar:2.2.2")
implementation 'com.akexorcist:round-corner-progress-bar:2.2.2'
Demo
Go to Google Play to download the demo app
Overview
Round Corner Progress Bar
Simple round corner progress bar

CenteredRoundCornerProgressBar
Round corner progress bar with progress expands from the center

Icon Round Corner Progress Bar
Round corner progress bar with heading icon
![]()
TextRoundCornerProgressBar
Round corner progress bar with text inside the progress

IndeterminateRoundCornerProgressBar and IndeterminateCenteredRoundCornerProgressBar
Simple round corner progress bar and centered round corner progress bar with indeterminate animation

Feature
Standard Features
- Primary progress and secondary progress supported
- Primary progress, secondary progress and progress background color are customizable
- Customize your own progress background padding
- Customize your own progress's corner radius
- Reversing progress bar supported
- Progress bar with gradient color? Yes!
- Progress change animation? Absolutely yes!
Component Features
- Progress expanding from center with
CenteredRoundCornerProgressBar - Heading icon supported with
IconRoundCornerProgressBar - Text inside progress supported with
TextRoundCornerProgressBar - Indeterminate animation supported with
IndeterminateRoundCornerProgressBarorIndeterminateCenteredRoundCornerProgressBar
Usage
For using custom attribute of progress bar, define 'app' namespace as root view attribute in your layout
xmlns:app="http://schemas.android.com/apk/res-auto"
RoundCornerProgressBar
Example
<com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar
android:layout_width="260dp"
android:layout_height="30dp"
app:rcBackgroundColor="#0A000000"
app:rcBackgroundPadding="2dp"
app:rcMax="100"
app:rcProgress="40"
app:rcProgressColor="#EF5350"
app:rcRadius="10dp"
app:rcSecondaryProgress="60"
app:rcSecondaryProgressColor="#40EF5350" />

Layout XML
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
app:rcProgress="float"
app:rcSecondaryProgress="float"
app:rcMax="float"
app:rcRadius="dimension"
app:rcBackgroundPadding="dimension"
app:rcReverse="boolean"
app:rcProgressColor="color"
app:rcSecondaryProgressColor="color"
app:rcBackgroundColor="color"
app:rcAnimationEnable="boolean"
app:rcAnimationSpeedScale="float" />
Public Methods
// Progress
fun getMax(): Float
fun setMax(max: Float)
fun setMax(max: Int)
fun getProgress(): Float
fun setProgress(progress: Int)
fun setProgress(progress: Float)
fun getSecondaryProgress(): Float
fun setSecondaryProgress(secondaryProgress: Int)
fun setSecondaryProgress(secondaryProgress: Float)
// Dimension
fun getRadius(): Int
fun setRadius(radius: Int)
fun getPadding(): Int
fun setPadding(padding: Int)
fun getLayoutWidth(): Float
// Animation
fun enableAnimation()
fun disableAnimation()
fun getAnimationSpeedScale(): Float
fun setAnimationSpeedScale(scale: Float)
fun isProgressAnimating(): Boolean
fun isSecondaryProgressAnimating(): Boolean
// Reversing Progress
fun isReverse(): Boolean
fun setReverse(isReverse: Boolean)
// Color
fun getProgressBackgroundColor(): Int
fun setProgressBackgroundColor(color: Int)
fun getProgressColor(): Int
fun setProgressColor(color: Int)
fun getProgressColors(): List<Int>
fun setProgressColors(colors: List<Int>)
fun getSecondaryProgressColor(): Int
fun setSecondaryProgressColor(color: Int)
fun getSecondaryProgressColors(): List<Int>
fun setSecondaryProgressColors(colors: List<Int>)
// Listener
fun setOnProgressChangedListener(listener: OnProgressChangedListener)
CenteredRoundCornerProgressBar
Same as RoundCornerProgressBar but reversing does not supported.
Example
<com.akexorcist.roundcornerprogressbar.CenteredRoundCornerProgressBar
android:layout_width="260dp"
android:layout_height="30dp"
app:rcBackgroundColor="#0A000000"
app:rcBackgroundPadding="2dp"
app:rcMax="100"
app:rcProgress="40"
app:rcProgressColor="#EF5350"
app:rcRadius="10dp"/>

Layout XML
<com.akexorcist.roundcornerprogressbar.CenteredRoundCornerProgressBar
app:rcProgress="float"
app:rcSecondaryProgress="float"
app:rcMax="float"
app:rcRadius="dimension"
app:rcBackgroundPadding="dimension"
app:rcProgressColor="color"
app:rcSecondaryProgressColor="color"
app:rcBackgroundColor="color"
app:rcAnimationEnable="boolean"
app:rcAnimationSpeedScale="float" />
Public Methods
// Progress
fun getMax(): Float
fun setMax(max: Float)
fun setMax(max: Int)
fun getProgress(): Float
fun setProgress(progress: Int)
fun setProgress(progress: Float)
fun getSecondaryProgress(): Float
fun setSecondaryProgress(secondaryProgress: Int)
fun setSecondaryProgress(secondaryProgress: Float)
// Dimension
fun getRadius(): Int
fun setRadius(radius: Int)
fun getPadding(): Int
fun setPadding(padding: Int)
fun getLayoutWidth(): Float
// Animation
fun enableAnimation()
fun disableAnimation()
fun getAnimationSpeedScale(): Float
fun setAnimationSpeedScale(scale: Float)
fun isProgressAnimating(): Boolean
fun isSecondaryProgressAnimating(): Boolean
// Color
fun getProgressBackgroundColor(): Int
fun setProgressBackgroundColor(color: Int)
fun getProgressColor(): Int
fun setProgressColor(color: Int)
fun getProgressColors(): List<Int>
fun setProgressColors(colors: List<Int>)
fun getSecondaryProgressColor(): Int
fun setSecondaryProgressColor(color: Int)
fun getSecondaryProgressColors(): List<Int>
fun setSecondaryProgressColors(colors: List<Int>)
// Listener
fun setOnProgressChangedListener(listener: OnProgressChangedListener)
IconRoundCornerProgressBar
Icon size is required for this progress bar. Use wrap_content for layout_height is recommended.
<com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar
android:layout_height="wrap_content"
app:rcIconSize="40dp"
... />
Example
<com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar
android:layout_width="260dp"
android:layout_height="wrap_content"
app:rcBackgroundColor="#0A000000"
app:rcBackgroundPadding="2dp"
app:rcIconBackgroundColor="#00796B"
app:rcIconPadding="5dp"
app:rcIconSize="40dp"
app:rcIconSrc="@drawable/ic_android"
app:rcMax="150"
app:rcProgress="90"
app:rcProgressColor="#EF5350"
app:rcRadius="5dp"
app:rcReverse="true" />
![]()
Layout XML
<com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar
app:rcProgress="float"
app:rcSecondaryProgress="float"
app:rcMax="float"
app:rcRadius="dimension"
app:rcBackgroundPadding="dimension"
app:rcReverse="boolean"
app:rcProgressColor="color"
app:rcSecondaryProgressColor="color"
app:rcBackgroundColor="color"
app:rcAnimationEnable="boolean"
app:rcAnimationSpeedScale="float"
app:rcIconSrc="reference"
app:rcIconSize="dimension"
app:rcIconWidth="dimension"
app:rcIconHeight="dimension"
app:rcIconPadding="dimension"
app:rcIconPaddingLeft="dimension"
app:rcIconPaddingRight="dimension"
app:rcIconPaddingTop="dimension"
app:rcIconPaddingBottom="dimension"
app:rcIconBackgroundColor="color" />
Public Methods
// Progress
fun getMax(): Float
fun setMax(max: Float)
fun setMax(max: Int)
fun getProgress(): Float
fun setProgress(progress: Int)
fun setProgress(progress: Float)
fun getSecondaryProgress(): Float
fun setSecondaryProgress(secondaryProgress: Int)
fun setSecondaryProgress(secondaryProgress: Float)
// Dimension
fun getRadius(): Int
fun setRadius(radius: Int)
fun getPadding(): Int
fun setPadding(padding: Int)
fun getLayoutWidth(): Float
fun getIconSize(): Int
fun setIconSize(size: Int)
fun getIconPadding(): Int
