-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If we click between the two stars, both star will get clicked #75
Comments
Duplicate of #28? |
Could you illustrate your issue with a screenshot? Where did the click happen and what was the unexpected behavior? |
Closing for inactivity. |
@zhanghai i already added all the require things, Why you closed it without solution |
Oh, I didn't notice your edit. But still, where exactly did the click happen? |
Please check updated the image & highlighted clicked area |
Your code looks reasonable to me and I don't have a good idea why it doesn't work for you. I would suggest debugging it more, e.g. printing the ratings received & set in the listener to logcat and see if they are the expected values. |
When i click between 2 & 3 star (highlighted by blue color), both are getting selected
XML code:-
<me.zhanghai.android.materialratingbar.MaterialRatingBar
android:id="@+id/feedbackRatingBar"
style="@style/customRatingBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminateTint="#FFCB07"
android:numStars="3"
android:progressTint="#FFCB07"
android:secondaryProgressTint="#00000000"
android:stepSize="0.01" />
Code:
feedbackRatingBar?.setOnRatingBarChangeListener { _, rating, fromUser ->
if(fromUser){
feedbackRatingBar?.rating = ceil(rating)
}
}
The text was updated successfully, but these errors were encountered: