A highly customizable and styleable circular progress view.
No Data
This view is meant to be a customizable determinate progress view like the standard android indeterminate progress bar, but highly customizable
It is built with Kotlin and supports heavy customization options and a convenient way to animate progress automatically. You can use XML and Kotlin/Java functions to customize it. You can check out the very robust demo app over here
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
dependencies { implementation 'com.github.owl-93:DeterminateProgressView:v1.4.1' }
| Attribute | XML attr | XML Type | XML Values | Kotlin field | Kotlin Type | Kotlin Values | Default Value | |------------------------------|----------------------------|----------|------------------------------------------------------------------------------------------------------------------|---------------------------|------------------------|------------------------------------|-----------------------| | Progress | progress | float | 0 - maxValue | progress | Float | 0f - maxValue | maxValue | | Max Value | maxValue | float | >0 | maxValue | Float | > 0f | 100f | | Stroke Width | strokeWidth | dimen | >0 | strokeWidth | Float | > 0f | 20f | | Stroke Color | strokeColor | color | @color, #hexcolor | strokeColor | Int | - | @colorPrimary | | Stroke End Style | strokeEndStyle | enum | "square", "round" | strokeEnd | Paint.Cap | - | Paint.Cap.ROUND | | Draw Track | drawTrack | boolean | "true", "false" | drawTrack | Boolean | - | true | | Track Color | trackColor | color | @color, #hexcolor | trackColor | Int | - | @colorPrimary | | Track Width | trackWidth | dimen | @dimen, >= 0 | trackWidth | Float | - | strokeWidth/2 | | Track Alpha | trackAlpha | float | >= 0 | trackAlpha | Int | - | 100 | | Starting Angle | startingAngle | integer | >= 0 | startingAngle | Int | >=0f | 0 | | Direction | direction | enum | "ccw", "cw" | direction | Direction | Direction | Direction.CW | | Progress Anim. Duration | animateProgressDuration | integer | >0 | animationDuration | Long | >0f | 400L | | Progress Anim. Interpolator | animationInterpolator | enum | "decelerate", "accelerate", "acceleratedecelerate", "linear", "anticipate", "overshoot", "anticipateovershoot" | animationInterpolator | Animation.Interpolator | Animation.Interpolator | DeclerateInterpolator | | Stroke Gradient Start Color | gradientStartColor | color | @color, #hexcolor | gradientStartColor | Int | - | - | | Stroke Gradient Center Color | gradientCenterColor | color | @color, #hexcolor | gradientCenterColor | Int | - | - | | Stroke Gradient End Color | gradientEndColor | color | @color, #hexcolor | gradientEndColor | Int | - | - | | Stroke Gradient Style | strokeGradientStyle | enum | "sweep", "linear", "radial", "candycane" | strokeGradientStyle | Gradient | Gradient | Gradient.STYLESWEEP | | Stroke Gradient Linear Angle | strokeGradientlinearAngle | integer | "0", "45", "90", "135", "180", "225", "270", "315" | strokeGradientLinearAngle | Int | 0, 45, 90, 135, 180, 225, 270, 315 | 0 | | Stroke Gradient Radial Size | strokeGradientSize | enum | "view", "strokeonly" | strokeGradientSize | StrokeGradient | StrokeGradient | StrokeGradient.VIEW |
| Attribute | XML attr | XML Type | XML Values | Kotlin field | Kotlin Type | Kotlin Values | Default Value | |----------------------------|--------------------------|----------|-----------------------------------------------------|-------------------------|--------------|------------------------------------|------------------------| | Text Enabled | textEnabled | boolean | "true", "false" | textEnabled | Boolean | Boolean | true | | Text Format | textFormat | enum | "pcnt", "pcntdecimal", "integer", "progress" | textFormat | TextFormat | TextFormat | TextFormat.PERCENT | | Custom Text | text | string | @string, "string" | text | String | String | null | | Text Color | textColor | color | @color, #hexcolor | textColor | Int | Int | @colorPrimary | | Text Size | textSize | dimen | @dimen, >= 0 | textSize | Float | Float | 14f | | Text Gradient Start Color | textGradientStartColor | color | @color, #hexcolor | textGradientStartColor | Int | - | - | | Text Gradient Center Color | textGradientCenterColor | color | @color, #hexcolor | textGradientCenterColor | Int | - | - | | Text Gradient End Color | textGradientEndColor | color | @color, #hexcolor | textGradientEndColor | Int | - | - | | Text Gradient Style | textGradientStyle | enum | "sweep", "linear", "radial" | textGradientStyle | Gradient | Gradient | Gradient.SWEEP | | Text Gradient Linear Angle | textGradientlinearAngle | integer | "0", "45", "90", "135", "180", "225", "270", "315" | textGradientLinearAngle | Int | 0, 45, 90, 135, 180, 225, 270, 315 | 0 | | Text Gradient Size | textGradientSize | enum | "view", "textonly" | textGradientSize | TextGradient | TextGradient | TextGradient.TEXTONLY |
Experimental Candy cane gradients