. How can I prevent the text from getting out of bounds as in the screenshot? Constraining the the textend to
parent.end
doesn't seem to work in this case.
f
Filip Wiesner
03/22/2021, 11:42 AM
Make sure to set
width = Dimension.fillToConstraints
on in the
constrainAs
DSL
l
Lukas
03/22/2021, 12:25 PM
Sadly didn't do any difference, though thanks for making me aware of
Dimension.fillToConstraints
.
j
jim
03/22/2021, 4:13 PM
Also,
ConstraintLayout
is not compatible with other platforms like Desktop, so keep that in mind, it might be desirable to do layout via pure Compose thus making your widget more reusable.
c
Colton Idle
03/22/2021, 4:54 PM
oOooOH! CL is android only? That's a game changer... might have to stick to rows and cols. 😄
j
jim
03/22/2021, 5:17 PM
You can also write a custom layout, which allows you to do anything you want in terms of layout, and is thus even more flexible than constraint layout. A bit of a learning curve, but well worth it.