Android RatingBar with ratingBarStyleIndicator theme and rating less 0.5
RatingBar with ratingBar开发者_如何学运维StyleIndicator theme applied doesn't want to show values less than 0.5, it shows them as 0.5. But all is ok with greater values like 0.6..1. When style is default behavior is right. Do you know the reason?
I was having the same problem. The behaviour seems to depend on a combination of the amount of transparent pixels around the 'star' image being used, and the device the app is running on (eg sometimes it doesn't go below 0.5 on the emulator, but goes to zero on my actual phone).
The workaround I found is to include a good chunk of blank space to the left of the ratingbar. Eg try adding...
android:layout_marginLeft="10dp"
...and if that works, experiment to see how much you can close up the gap and still get the reading down to zero.
精彩评论