Convert Figma logo to code with AI

akexorcist logoRoundCornerProgressBar

[Android] Round Corner Progress Bar Library for Android

2,500
371
2,500
9

Top Related Projects

A beautiful, slim Android ProgressBar.

CircleProgress, DonutProgress, ArcProgress

Quick Overview

RoundCornerProgressBar is an Android library that provides customizable progress bars with rounded corners. It offers various styles of progress bars, including linear and circular, with options for customizing colors, shapes, and animations.

Pros

  • Easy to implement and customize with XML attributes
  • Supports both determinate and indeterminate progress
  • Offers multiple progress bar styles (linear, circular, icon)
  • Smooth animations and gradient color options

Cons

  • Limited to Android platform
  • May require additional setup for complex custom designs
  • Documentation could be more comprehensive
  • Some advanced features may have a learning curve

Code Examples

  1. Basic Linear Progress Bar:
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
    android:id="@+id/progressBar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:rcProgress="50"
    app:rcMax="100"
    app:rcSecondaryProgress="75"
    app:rcBackgroundPadding="5dp"
    app:rcRadius="10dp" />
  1. Circular Progress Bar:
<com.akexorcist.roundcornerprogressbar.CircleProgressBar
    android:id="@+id/circleProgressBar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:rcProgress="75"
    app:rcMax="100"
    app:rcProgressColor="#4CAF50"
    app:rcSecondaryProgressColor="#BBDEFB"
    app:rcBackgroundColor="#ECEFF1" />
  1. Programmatically Update Progress:
val progressBar = findViewById<RoundCornerProgressBar>(R.id.progressBar)
progressBar.progress = 75f
progressBar.secondaryProgress = 90f

Getting Started

  1. Add the dependency to your app's build.gradle:
dependencies {
    implementation 'com.akexorcist:round-corner-progress-bar:2.2.1'
}
  1. Add the progress bar to your layout XML:
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
    android:id="@+id/progressBar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:rcProgress="0"
    app:rcMax="100" />
  1. Customize and control the progress bar in your Activity or Fragment:
val progressBar = findViewById<RoundCornerProgressBar>(R.id.progressBar)
progressBar.progress = 50f
progressBar.progressColor = Color.BLUE

Competitor Comparisons

A beautiful, slim Android ProgressBar.

Pros of NumberProgressBar

  • Simpler implementation with fewer customization options, making it easier to use for basic progress bar needs
  • Includes a built-in number display, which is useful for showing precise progress percentages
  • Smaller library size, potentially reducing app bloat

Cons of NumberProgressBar

  • Limited customization options compared to RoundCornerProgressBar
  • Lacks support for multiple progress bars or complex layouts
  • No built-in support for gradient colors or custom shapes

Code Comparison

RoundCornerProgressBar:

<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:rcProgress="50"
    app:rcSecondaryProgress="75"
    app:rcMax="100"
    app:rcRadius="10dp"
    app:rcBackgroundPadding="2dp"
    app:rcProgressColor="#8BC34A"
    app:rcSecondaryProgressColor="#4CAF50"
    app:rcBackgroundColor="#CCCCCC" />

NumberProgressBar:

<com.daimajia.numberprogressbar.NumberProgressBar
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:progress_current="50"
    app:progress_max="100"
    app:progress_unreached_color="#CCCCCC"
    app:progress_reached_color="#3498DB"
    app:progress_text_size="10sp"
    app:progress_text_color="#3498DB" />

CircleProgress, DonutProgress, ArcProgress

Pros of CircleProgress

  • Focuses specifically on circular progress indicators, potentially offering more customization options for this type
  • Simpler implementation for circular progress bars, with fewer lines of code required
  • May have better performance for circular progress indicators due to its specialized nature

Cons of CircleProgress

  • Limited to circular progress bars, lacking the versatility of RoundCornerProgressBar for other shapes
  • Potentially less actively maintained, with fewer updates and community contributions
  • May have fewer features or customization options for non-circular progress indicators

Code Comparison

RoundCornerProgressBar:

val progressBar = RoundCornerProgressBar(context)
progressBar.progress = 50f
progressBar.max = 100f
progressBar.radius = 10f
progressBar.progressColor = Color.BLUE

CircleProgress:

val circleProgress = CircleProgress(context)
circleProgress.progress = 50
circleProgress.max = 100
circleProgress.strokeWidth = 10f
circleProgress.progressColor = Color.BLUE

Both libraries offer similar basic functionality for setting progress, maximum value, and color. However, RoundCornerProgressBar provides additional options for customizing corner radius, while CircleProgress focuses on stroke width for circular indicators.

Pros of discreteSeekBar

  • Offers a discrete seek bar with customizable steps and labels
  • Provides a more intuitive user experience for selecting specific values
  • Includes a floating bubble indicator for better visual feedback

Cons of discreteSeekBar

  • Limited to seek bar functionality, less versatile than RoundCornerProgressBar
  • May require more setup for custom styling compared to RoundCornerProgressBar
  • Less suitable for displaying progress without user interaction

Code Comparison

RoundCornerProgressBar:

<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:rcProgress="50"
    app:rcMax="100"
    app:rcRadius="10dp"
    app:rcBackgroundColor="#0A000000"
    app:rcProgressColor="#00BCD4" />

discreteSeekBar:

<org.adw.library.widgets.discreteseekbar.DiscreteSeekBar
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:dsb_min="0"
    app:dsb_max="100"
    app:dsb_value="50"
    app:dsb_indicatorColor="#00BCD4"
    app:dsb_progressColor="#00BCD4" />

Both libraries offer easy-to-use XML implementations, but discreteSeekBar focuses on user input with discrete steps, while RoundCornerProgressBar provides a more flexible progress bar with customizable corner radius.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Android Kotlin Minimum SDK Version Maven Central Apache 2.0 Workflow Status

Google Dev Library Android Arsenal

RoundCornerProgressBar

Round corner is cool. Let's make your progress bar with round corner

Round Corner Progress Bar Sample

Colorful rounded corner progress bar

Download

Gradle

implementation 'com.akexorcist:round-corner-progress-bar:2.2.1'

Demo

Go to Google Play to download the demo app

Overview

Round Corner Progress Bar

Simple round corner progress bar

Round Corner Progress Bar

CenteredRoundCornerProgressBar

Round corner progress bar with progress expands from the center

Centered Round Corner Progress Bar

Icon Round Corner Progress Bar

Round corner progress bar with heading icon

Icon Round Corner Progress Bar

TextRoundCornerProgressBar

Round corner progress bar with text inside the progress

Icon Round Corner Progress Bar

IndeterminateRoundCornerProgressBar and IndeterminateCenteredRoundCornerProgressBar

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

Indeterminate Round Corner Progress Bar and Indeterminate Centered Round Corner Progress Bar

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 IndeterminateRoundCornerProgressBar or IndeterminateCenteredRoundCornerProgressBar

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" />

Round Corner Progress Bar

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"/>

Centerd Round Corner Progress Bar

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" />

Icon Round Corner Progress Bar

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
fun setIconPadding(padding: Int)
fun getIconPaddingLeft(): Int
fun setIconPaddingLeft(padding: Int)
fun getIconPaddingTop(): Int
fun setIconPaddingTop(padding: Int)
fun getIconPaddingRight(): Int
fun setIconPaddingRight(padding: Int)
fun getIconPaddingBottom(): Int
fun setIconPaddingBottom(padding: Int)

// 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>)
fun getColorIconBackground(): Int
fun setIconBackgroundColor(color: Int)

// Icon
fun getIconImageResource(): Int
fun setIconImageResource(resId: Int)
fun getIconImageBitmap(): Birmap
fun setIconImageBitmap(bitmap: Bitmap)
fun getIconImageDrawable(): Drawable
fun setIconImageDrawable(drawable: Drawable)

// Listener
fun setOnProgressChangedListener(listener: OnProgressChangedListener)
fun setOnIconClickListener(listener: OnIconClickListener)

TextRoundCornerProgressBar

Example

<com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar
    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="80dp"
    app:rcReverse="true"
    app:rcSecondaryProgress="60"
    app:rcSecondaryProgressColor="#40009688"
    app:rcTextPositionPriority="outside"
    app:rcTextProgress="40"
    app:rcTextProgressColor="#111111" />

Text Round Corner Progress Bar

Layout XML

<com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar
        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:rcTextProgressColor="color"
        app:rcTextProgressSize="dimension"
        app:rcTextProgressMargin="dimension"
        app:rcTextProgress="String"
        app:rcTextInsideGravity="start|end"
        app:rcTextOutsideGravity="start|end"
        app:rcTextPositionPriority="inside|outside" />

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 getTextProgressSize(): Int
fun setTextProgressSize(size: Int)
fun getTextProgressMargin(): Int
fun setTextProgressMargin(margin: Int)

// 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>)
fun getTextProgressColor(): Int
fun setTextProgressColor(color: Int)

// Text
fun getProgressText(): String
fun setProgressText(text: String)

// Position
fun getTextPositionPriority(): Int
fun setTextPositionPriority(priority: Int)
fun getTextInsideGravity(): Int
fun setTextInsideGravity(gravity: Int)
fun getTextOutsideGravity(): Int
fun setTextOutsideGravity(gravity: Int)

// Listener
fun setOnProgressChangedListener(listener: OnProgressChangedListener)

IndeterminateRoundCornerProgressBar

Example

<com.akexorcist.roundcornerprogressbar.indeterminate.IndeterminateRoundCornerProgressBar
    android:layout_width="260dp"
    android:layout_height="10dp"
    app:rcAnimationSpeedScale="3"
    app:rcBackgroundColor="#0A000000"
    app:rcProgressColor="#EF5350" />

Indeterminate Round Corner Progress Bar

Layout XML

<com.akexorcist.roundcornerprogressbar.indeterminate.IndeterminateRoundCornerProgressBar
        app:rcRadius="dimension"
        app:rcBackgroundPadding="dimension"
        app:rcReverse="boolean"
        app:rcProgressColor="color"
        app:rcSecondaryProgressColor="color"
        app:rcBackgroundColor="color"
        app:rcAnimationSpeedScale="float" />

Public Methods

// Dimension
fun getRadius(): Int
fun setRadius(radius: Int)
fun getPadding(): Int
fun setPadding(padding: Int)
fun getLayoutWidth(): Float

// Animation
fun getAnimationSpeedScale(): Float
fun setAnimationSpeedScale(scale: Float)

// 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>)

IndeterminateCenteredRoundCornerProgressBar

Same as IndeterminateRoundCornerProgressBar

Example

<com.akexorcist.roundcornerprogressbar.indeterminate.IndeterminateCenteredRoundCornerProgressBar
    android:layout_width="260dp"
    android:layout_height="10dp"
    app:rcAnimationSpeedScale="0.75"
    app:rcBackgroundColor="#0A000000"
    app:rcProgressColor="#EF5350" />

Indeterminate Centered Round Corner Progress Bar

Layout XML

<com.akexorcist.roundcornerprogressbar.IndeterminateCenteredRoundCornerProgressBar
        app:rcRadius="dimension"
        app:rcBackgroundPadding="dimension"
        app:rcReverse="boolean"
        app:rcProgressColor="color"
        app:rcSecondaryProgressColor="color"
        app:rcBackgroundColor="color"
        app:rcAnimationSpeedScale="float" />

Public Methods

// Dimension
fun getRadius(): Int
fun setRadius(radius: Int)
fun getPadding(): Int
fun setPadding(padding: Int)
fun getLayoutWidth(): Float

// Animation
fun getAnimationSpeedScale(): Float
fun setAnimationSpeedScale(scale: Float)

// 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>)

Apply Gradient Progress Bar Color

Gradient color for progress bar must be in int array resource. At least 2 colors.

<!-- Color Resource -->
<resources>
    <array name="sample_progress_gradient">
        <item>#009688</item>
        <item>#80CBC4</item>
    </array>
</resources>

<!-- Layout -->
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
    ...
    app:rcBackgroundColor="#0A000000"
    app:rcBackgroundPadding="4dp"
    app:rcMax="100"
    app:rcProgress="50"
    app:rcProgressColors="@array/sample_progress_gradient"
    app:rcRadius="30dp" />

Gradient Progress Bar Color

Progress bar does not clipped when size changed. So the gradient color will fully display without clipping also.

Apply Progress Change Animation

Animation when progress change is disabled by default (exclude IndeterminateProgressBar and IndeterminateCenteredProgressBar).

So you have to enable the animation by XML attribute or programmatically

<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
    ...
    app:rcAnimationEnable="true"
    app:rcAnimationSpeedScale="1" />

When progress changed, the animation will applied automatically.

Comparison Between With/Without Animation

Animation speed scale's value is float between 0.2 - 5.0 (default is 1.0). Higher for slow down the animation, lower for speed up.

What's Next

  • IconTextRoundCornerProgressBar (#69)
  • UI Preview improvement

Known Issues

  • Incorrect progress showing in CenteredRoundCornerProgressBar with 1%-2% value
  • Incorrect text's width in TextRoundCornerProgressBar when outside priority and value close to 100%
  • setProgress(progress: Int) does not update text position

Change Log

See CHANGELOG.md

Migration

See MIGRATION.md

Licence

Copyright 2023 Akexorcist

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or 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.