https://kotlinlang.org logo
v

Vladimir Ivanov

06/11/2019, 12:17 PM
Also, why root surface is expanded on a whole screen while surface enclosing say an EditableText does not?
a

Andrey Kulikov

06/11/2019, 12:24 PM
Surface is taking a size of it's children. there are some layout which are taking all the available space and some that wraps. For example there is a Wrap component for this
l

Leland Richardson [G]

06/11/2019, 7:57 PM
hmm - this is kinda confusing though, isn’t it? You’re saying that
Surface { }
ends up expanding to fill all space, but
Surface { Text(...) }
will wrap the text?
a

Andrey Kulikov

06/11/2019, 9:40 PM
Surface with no child will use min constraint size, which should be 0. but a lot Layouts we have take all the available space by default. So if you wrap them into Surface that would fill the space