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

smileyrating on a recyclerview when disallowSelection(true) #65

Open
ghost opened this issue Nov 3, 2020 · 2 comments
Open

smileyrating on a recyclerview when disallowSelection(true) #65

ghost opened this issue Nov 3, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 3, 2020

Hi

Thank you for a magnificent component!
I saw the code you posted regarding working with RecyclerView but from my understanding it's related to touch events conflicts and this is irrelevant in my case, please see code below.

I have a fragment with a scrollview containing 6 smiley rating component and I have a recyclerview with a scrollview containing 6 smiley rating component. On both I have the following code (for simplicity, the example shows 2 components):

srRater1.disallowSelection(true);
srRater2.disallowSelection(true);
srRater1.setRating(dataSet.get(0).getRate1(), true); //dataSet.get(0).getRate1() = 4
srRater2.setRating(dataSet.get(0).getRate2(), true);

With the fragment/scrollview everything is working as expected but with the recyclerview/scrollview, the debugger shows the correct smiley selected but the actual selected smiley is 0.
image

Am I missing something?
Thanks

@ghost
Copy link
Author

ghost commented Nov 5, 2020

The problem seems to be with mInflationDone which is false or in other words, the view thinks it's still not inflated. When not inside a recyclerview, this is true hence working.

@rama-2402
Copy link

The problem seems to be with mInflationDone which is false or in other words, the view thinks it's still not inflated. When not inside a recyclerview, this is true hence working.

Hi i'm having the same issue. The smileyrating is always at 0. Btw how to fix this inside the recycler view?

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

1 participant