custom-rating-bar
custom-rating-bar copied to clipboard
Rating can be set above maximum star value if user swipes beyond edge of rating bar
Just a heads up
This line needs correcting too: return value < 0 ? 1 : value;
That will allow a vote of 0 if the user hits the exact spot for a zero score, but will increase it to 1 if the touch point is further to the left. Here is what I did to correct both issues: value = value <= 0 ? 1 : value; value = value > mMaxStars ? mMaxStars : value; return value;