Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
ConstraintLayout version: 2.1.4
I try to make a layout where a square image is placed on the left side with a height equal to the height of a text, which is placed to the right of it. If it's not enough space for the text, it should be shortened.
I achieve this by using
app:layout_constraintDimensionRatio="W, 1:1"
for the image while vertically aligning it on the top and bottom edges of the text. The texts useandroid:layout_width="wrap_content"
withapp:layout_constrainedWidth="true"
In case when I have only one TextView everything goes fine, but when the second TextView is introduced under the first one, ImageView shrinks to zero (instead of reducing width of the texts) when there is not enough space for both of the texts (by the way, when only one text doesn't fit, everything works).
Works:
Doesn't work: