@@ -32,7 +32,7 @@ allprojects {
3232And add a dependency code to your ** module** 's ` build.gradle ` file.
3333``` gradle
3434dependencies {
35- implementation "com.github.skydoves:progressview:1.0.5 "
35+ implementation "com.github.skydoves:progressview:1.0.6 "
3636}
3737```
3838
@@ -56,6 +56,7 @@ Here is a basic example of implementing `ProgressView`.
5656 app:progressView_progress="40" // progress value.
5757 app:progressView_min="15" // min progress value.
5858 app:progressView_max="100" // max progress value.
59+ app:progressView_progressFromPrevious="true" // animates progress from previous progress.
5960 app:progressView_autoAnimate="true" // starts filling animation automatically when finishing inflate.
6061 app:progressView_radius="12dp" // the corner radius of the progressView and progress bar.
6162 app:progressView_padding="1dp" // the padding of the progress bar.
@@ -76,11 +77,21 @@ app:progressView_colorGradientStart="@color/md_yellow_100" // starting color of
7677app:progressView_colorGradientEnd="@color/md_yellow_200" // ending color of the gradient.
7778```
7879
80+ We can change the progress color and gradient colors using below methods.
81+ ``` kotlin
82+ progressView.highlightView.color = ContextCompat .getColor(this , R .color.colorPrimary)
83+ progressView.highlightView.colorGradientEnd = ContextCompat .getColor(this , R .color.colorPrimary)
84+ progressView.highlightView.colorGradientStart = ContextCompat .getColor(this , R .color.colorPrimary)
85+ ```
86+
7987### Filling Animation
8088We can implement the filling animation using below attributes or method.
8189
8290``` gradle
8391app:progressView_autoAnimate="true" // starts filling animation automatically when progress is changed.
92+
93+ // if you want to animate progress from previous progress.
94+ app:progressView_progressFromPrevious="true"
8495```
8596
8697or we can animate manually using below method.
@@ -219,6 +230,7 @@ colorBackground | Int(Color) | Color.WHITE | color of the container.
219230colorGradientStart | Int(Color) | colorPrimary | starting color of the gradient.
220231colorGradientEnd | Int(Color) | colorPrimary | ending color of the gradient.
221232autoAnimate | Boolean | true | starts filling animation automatically when finishing inflate.
233+ progressFromPrevious | Boolean | false | animates progress from previous progress.
222234
223235### Label
224236Attributes | Type | Default | Description
0 commit comments