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

[Question] Dynamic expandable view content #6

Open
barchinsky opened this issue Sep 21, 2020 · 1 comment
Open

[Question] Dynamic expandable view content #6

barchinsky opened this issue Sep 21, 2020 · 1 comment

Comments

@barchinsky
Copy link

Hi @nikhilpanju,

thank you for nice example!

I have question regarding expandable view as I faced some strange behaviour of onPreDraw in case expandable view content heigh is dynamic. For example content of expandable view can be changed once user is refreshing data. In this case onPreDraw returns wrong height of expandable view on each 3rd refresh attempt where on first and second render everything works nice.

Mb you faced with similar behaviour?

@baggednismo
Copy link

Have you tried moving the expandable height logic to its own method and calling it inside of onBindViewHolder? I also adjusted the condition. If your dataset has changed you might also want to check it in onViewRecycled()

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

2 participants