# compose

Lukasz Burcon

03/01/2021, 10:03 AM
Hey, I was working on implementing a wrappable Text compose function that doesn’t overlap any other view in the same row and instead takes all the available space and becomes a multiline text view. The problem is that even if it was wrapContent, it took all the available space while measuring (typical behaviour). I needed the width of multiline text to be the same as the X coordinate of the last letter in the longest row to match my design’s paddings. I had to create a custom
and measure it in multiple layout passes as you can’t call
multiple times in the same
section. Do you guys plan on opening MultiMeasureLayout API that’s internally used in ConstraintLayout so I don’t have to do multiple layout passes and just remeasure my view in one layout pass? Or is there any better solution to my problem you know about?

Halil Ozercan

03/01/2021, 11:01 AM
I didn't understand your question completely but I'd suggest you give a try to SubcomposeLayout from the few keywords I picked up.

Zach Klippenstein (he/him) [MOD]

03/01/2021, 3:29 PM
Can you post the code you tried to write to implement this? Also sounds like something that intrinsics might be good for