Skip to content

Commit

Permalink
Merge pull request #93 from akexorcist/release/2.2.0
Browse files Browse the repository at this point in the history
Release version 2.2.0
  • Loading branch information
akexorcist authored Apr 15, 2023
2 parents 93bec93 + eb8a714 commit 0a4782a
Show file tree
Hide file tree
Showing 6 changed files with 198 additions and 175 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
Release Notes
====

2.2.0
--
* Convert all Java classes to Kotlin
* Gradle 7.5
* Android Gradle Plugin 7.4.2
* Kotlin 1.8.20
* Compile & Target SDK version 33
* Minimum SDK version 17
* Update dependencies
* AndroidX Annotation 1.6.0

2.1.2
--
* Fix unspecified module error

2.1.1
--
* Fix bug in ([#57](https://github.com/akexorcist/Android-RoundCornerProgressBar/issues/57)) ([#77](https://github.com/akexorcist/Android-RoundCornerProgressBar/issues/77))
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ APPENDIX: How to apply the Apache License to your work.
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2015 Akexorcist
Copyright 2023 Akexorcist

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
63 changes: 63 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Migration

## Migrate from 2.0 to 2.1+

### BaseRoundCornerProgressBar.OnProgressChangedListener

Change the view ID parameter in `onProgressChanged` to View class

```kotlin
// Old
fun onProgressChanged(
viewId: Int,
progress: Float,
isPrimaryProgress: Boolean,
isSecondaryProgress: Boolean
)

// New
fun onProgressChanged(
view: View,
progress: Float,
isPrimaryProgress: Boolean,
isSecondaryProgress: Boolean
)
```

### Custom your own progress bar by extends BaseRoundCornerProgressBar

Use AnimatedRoundCornerProgressBar instead of BaseRoundCornerProgressBar for progress change animation support.

```Kotlin
class CustomRoundCornerProgressBar: AnimatedRoundCornerProgressBar() {
/* ... */
}
```

And you do not have to create the `GradientDrawable` by yourself anymore. `drawProgress` will send it as parameter.

```kotlin
// Old
fun drawProgress(
layoutProgress: LinearLayout,
max: Float,
progress: Float,
totalWidth: Float,
radius: Int,
padding: Int,
progressColor: Int,
isReverse: Boolean
)

// New
fun drawProgress(
layoutProgress: LinearLayout,
progressDrawable: GradientDrawable,
max: Float,
progress: Float,
totalWidth: Float,
radius: Int,
padding: Int,
isReverse: Boolean
)
```
Loading

0 comments on commit 0a4782a

Please sign in to comment.