Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setRating not work in kotlin #59

Open
aslami-dev opened this issue May 12, 2020 · 2 comments
Open

setRating not work in kotlin #59

aslami-dev opened this issue May 12, 2020 · 2 comments

Comments

@aslami-dev
Copy link

I'm trying to setRating(SmileyRating.Type.GREAT.rating, true) in kotlin similar to your description but it not work for me, and always TERRIBLE is selected what is my mistake?

`    smileyRating.setFaceBackgroundColor(SmileyRating.Type.TERRIBLE, Color.RED)
    smileyRating.setFaceBackgroundColor(SmileyRating.Type.BAD, 0xFFFF8606.toInt())
    smileyRating.setFaceBackgroundColor(SmileyRating.Type.GREAT, 0xFF50DA30.toInt())
    smileyRating.setFaceBackgroundColor(SmileyRating.Type.OKAY, 0xFFF3C641.toInt())

    smileyRating.setRating(SmileyRating.Type.GREAT.rating, true)


    smileyRating.setTitle(SmileyRating.Type.TERRIBLE, "Worst pain")
    smileyRating.setTitle(SmileyRating.Type.BAD, "Very Severe")
    smileyRating.setTitle(SmileyRating.Type.OKAY, "Moderate")
    smileyRating.setTitle(SmileyRating.Type.GOOD, "Mild")
    smileyRating.setTitle(SmileyRating.Type.GREAT, "No Pain")

`
also, I try and it not work

smileyRating.setRating(3, true)

@mauricioguell-sagaci
Copy link

Faced the same problem and solved by adding a little delay in the setRating method

@rama-2402
Copy link

Faced the same problem and solved by adding a little delay in the setRating method

@mauricioguell-sagaci Can you please tell me what function you used for delaying? I've tried using Coroutines, Handler, runblocking, Timer, After the delay it sets the rating correct but the color on the faces are gone :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants