that essentially measures the widest content in the layout and then sets the width of the dividing line to its value, and the width of the entire layout is determined by the width of the largest subitem.
This results in my
clickable
taking effect in different areas, only the maximum width of the child's clickable takes effect in the normal area, the others are all their own width, is there a good way to solve this problem? 🤔
s
Stylianos Gakis
05/28/2024, 11:16 AM
In your layout, go over all items and ask for their max intrinsic width before you actually measure them.
Then use that width as the constraints for all of your items, so they all have the same fixed width.
I believe that should work.
n
Nthily
05/28/2024, 11:29 AM
that's what I was thinking, but it seems that it would have to measure the layout twice, and use the results from the first measurement as Constraints in the second measurement. 🤔