Hi. Is there a way to calculate if a text (on `Te...
# compose
a
Hi. Is there a way to calculate if a text (on
Text
) is going to take more than a single line?
In order to accomplish this
a
You can use a custom layout and measure the
Text
with a max width constraint and no min width constraint, and if there is space left for the button then put it on the same line otherwise start a new line.
a
I will go try
layout
then, thanks!
👍 1
e
Compose makes implementing design systems so much easier and definitely more fun! good luck