Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
gowtham.balamurugan committed May 27, 2023
2 parents b19f267 + 75bcd3b commit 88b3304
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repositories {
// App build.gradle
dependencies {
implementation 'com.github.a914-gowtham:compose-ratingbar:1.3.0'
implementation 'com.github.a914-gowtham:compose-ratingbar:1.3.1'
//mavenCentral
// implementation 'io.github.a914-gowtham:compose-ratingbar:1.2.3'
Expand Down Expand Up @@ -60,6 +60,26 @@ Ratingbar composable can be customized using [RatingBarConfig](https://github.c
.style(RatingBarStyle.HighLighted)
```

## Customization

<img src="https://github.com/a914-gowtham/compose-ratingbar/blob/main/customization_demo.gif" width="340" height="260"/>

```kotlin
RatingBar(
value = rating,
config = RatingBarConfig()
.padding(2.dp)
.size(32.dp),
painterEmpty = painterResource(id = R.drawable.icon_empty),
painterFilled = painterResource(id = R.drawable.icon_filled),
onValueChange = {
rating = it
},
onRatingChanged = {
Log.d("TAG", "onRatingChanged: $it")
}
)
```
## Library Info
* Current version of the library only supports Stepsize 1f and 0.5f when click or drag. However, Initial Rating value could be any float value like 3.8 etc.

Expand Down
Binary file added customization_demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 88b3304

Please sign in to comment.