williamyyu / SimpleRatingBar

A simple RatingBar that you can easier to customize image and animations
MIT License
1.36k stars 153 forks source link

Bug with rating #20

Closed Sirelon closed 7 years ago

Sirelon commented 7 years ago

Great lib! Thanks! But there is small bug. When you set rounded number as rating (in example 3.0 ) then BaseRatingBar shows three filled stars without others empty stars. Simple workaround is to set rating with float numbers 2.99 in example

williamyyu commented 7 years ago

Hello @Sirelon , Thank you so much!!! Your workaround totally resolve this bug! Do you know why this bug happened? I have no idea to resolve this problem in a good way several weeks.

Sirelon commented 7 years ago

Hi @ome450901 Nope. I shortly take a look in the code, but cannot find any strange behaviour. And for now I noticed one new bug, which cannot be fixed with such workaround. The bug occurs when RatingBar inside ScrollView. When I choose rating, then I tap to edit text (which on scrollview too) then opens keyboard, and scrollview simply scroll down to the edit text. And after this action RatingBar shows only selected stars.. I think it is related bug with first one.. In a free time I will take a look and maybe could fix it.

Sirelon commented 7 years ago

I think it bug on PartilalView.setPartialFilled(float rating) I will debug it later.

williamyyu commented 7 years ago

Hello @Sirelon , I was found that @senlsy has already provided a solution in issue #15 , and it solve this bug too. I will check the code to find out why this bug happened, maybe you can take a look with that comment too!

Thanks again for helping me debugging this issue!