Hey, I was working on implementing a wrappable Tex...
# compose
l
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
Layout
and measure it in multiple layout passes as you can’t call
measurables.measure()
multiple times in the same
layout
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?
h
I didn't understand your question completely but I'd suggest you give a try to SubcomposeLayout from the few keywords I picked up.
z
Can you post the code you tried to write to implement this? Also sounds like something that intrinsics might be good for