Thread
#compose
    k

    Koneko Toujou

    1 year ago
    how does Compose solve the following problem? there exists a Row with a child Row the child Row must know what it's size will be in order to compute how to place it's children but the parent Row cannot know the size of it's child Row until it has measured the child Row, and the child Row cannot know what it's size will be until the parent Row has measured it for example parent Row
    measure child Row
    child Row needs to know how big it will be in order to be able to layout it's children
    child Row needs information from parent Row
    parent Row has no information because it is still trying to measure child Row
    parent Row does not know how big child Row should be
    child Row does not know how big parent Row wants child Row to be
    child Row cannot measure itself reliably without assuming how big it is going to be
    Adam Powell

    Adam Powell

    1 year ago
    This happens using constraints. Parents measure children by passing a
    Constraints
    object that contains minimum and maximum width and height. The child can choose to be any size within that range.
    k

    Koneko Toujou

    1 year ago
    Thanks 😃