I'm using a RatingBar and OnRatingBarChangeListener in my Code. The user can the rating once and after this I set ratingBar.setEnabled(false)
. I want to show the user advice that he can't rate anymore. How can I achieve to set a Toast after the user touches the disabled RatingBar?
Anybody an idea?
greetings
android:attr/ratingBarStyleSmall" or scaleX/scaleY the click interaction with RatingBar is disabled. This works for me. Hope this helps you!
You could set the rating to isIndicator after the user makes his first change You should prompt the user to make sure his change is exactly as he wished. It can get pretty difficult to rate when the property stepSize (how precise the rating is) is 0.5
//You could prompt the user using a dialog to confirm he is done rating ratingBar.setIsIndicator(true);
That should leave the UI unchanged(no greyish blur) and prevent the user from making a change (just like setEnabled(false))
In XML Layout
android:isIndicator="true"
Hope it helped
As @Br0therzS0ul noted, it's isIndicator
.
Here's how in XMl:
android:isIndicator="true"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With