https://kotlinlang.org logo
#compose
Title
# compose
g

Gumiku

09/20/2023, 10:28 AM
how can I let parent know the measure size of a child? I set a width when measure child composable, but in parent when I try to get the width of that placeable of that child ’s width , always return the constraints’s maxWidth
v

Vlad

09/20/2023, 11:30 AM
SubcomposeLayout perhaps?
x

xoangon

09/21/2023, 8:01 AM
SubcomposeLayout
is only needed for lazy layouts. You can get the measure of a child from its father using a custom layout with Alignment lines. This talk explains it pretty neatly
👀 1