-
Notifications
You must be signed in to change notification settings - Fork 297
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
TextView measurement error after rebinding ViewHolder. #56
Comments
Okay, so this is a problem caused by internal measurement logic in TextView. TextView will not measure itself again if it believes there has been no change to its content. As recycler view sets exact dimensions for the non scrolling axis, this crops up whenever a text view has been rebound and the width is to be changed. The workaround to force TextView to measure itself again by some method. |
One solution is to not use the match_parent value for layout_width for TextViews that are in a view group. |
Another is to use different viewTypeIds for views intended for different layouts. |
So far I have been unable to work around the problem from the SuperSLiM end of things. :( |
Closing for now, people can resurrect this if they want to look into it again. |
Maybe leave this open so people can see/contribute, or make a note of it in the docs? |
I was going to note it in the docs, but sure, I'll leave it open too. |
Maybe report this as an issue to AOSP issue tracker? |
I don't think it is a bug. I mean, TextView and RecyclerView are both doing the correct thing. For now, I don't plan on doing anything about this, but in the future I might see if there is something I can do; patching RecyclerView, or perhaps some kind of change to SuperSLiM. |
Sometimes view measurement doesn't update.
bugged measurement
Correct measurement
Maybe related to #55.
Further investigation reveals sometimes the views are just not being measured, though the call through recycler view is being made. There must be some residual state stopping measurement. What can stop measurement?
The text was updated successfully, but these errors were encountered: