-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from akexorcist/release/2.2.0
Release version 2.2.0
- Loading branch information
Showing
6 changed files
with
198 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) | ||
``` |
Oops, something went wrong.