constraintlayout
constraintlayout copied to clipboard
Overlapping TextViews when optimizations are on
Left image is with optimizations turned on, clearly showing an overlap between the two TextViews. Right image is rendering everything correctly:
Here's a reproducible sample PR using constraint layout 2.1.0: https://github.com/vanniktech/playground/pull/1
My use case:
I have an RSS Reader where I'm loading images and depending whether the image is portrait or landscape I want to either
- display the description underneath the title (when image is portrait)
- display the description underneath the image + title (horizontally on the same line); (when image is landscape)
In my PR, I've quickly summed up this functionality.
For now my workaround is to:
constraintLayout.optimizationLevel = 0
@jafu888 is there any further information you need?
Also an issue with Constraint Layout 2.1.1 - potentially making it even worse:
