sujithkanna / SmileyRating

SmileyRating is a simple rating bar for android. It displays animated smileys as rating icon.
Apache License 2.0
1.07k stars 183 forks source link

Clearing the smiley selection. #46

Closed sivansundar closed 4 years ago

sivansundar commented 5 years ago

Hi @sujithkanna.

First of all, this is a really good library. Using this for a college project and I guess i'll surely use this in the future. Coming to the problem I faced, I wanted to clear the selection after a button click and I couldn't get that to work. Even after reading the documentation I couldn't find a way around this. After playing around for a while, the easiest way to acomplish this would be to set the setSelectedSmiley() function to -1, i.e, smileyRating.setSelectedSmiley(-1);

Doing this cleared the selection off. This could be handy when it comes to submitting a survey or a rating in general and you would want to clear the selection after submission.

Just wanted to raise a solution/info. Thanks for the cool library. Cheers (y)

cybkw commented 5 years ago

that's great

jonyluke commented 5 years ago

smileRating.setSelectedSmile(BaseRating.NONE);