I am using a rating bar in my android application and am facing a problem. I have set the rating bar color to green and want it so if the rating is 3, than 3 stars are green and the last two are invisible. Right now if the rating is 3 then the first three are green and the next two are a lighter shade of green. Like this:
How can I change it so the if the rating is three then the last two stars are invisible.
It's not exactly a duplicate but I think you might be looking for something like this
How to create Custom Ratings bar in Android
Because you need to change the drawable used to display when the star is "off" in order to make it "invisible". AFAIK Android doesn't give you currently a way to hide the off-stars.