Hi! I’ve updated my app to dev08 and have some problems with it
1. Text widget not rendering if not directly encolosed by Surface, which is kinda strange
2. Button’s Box default gravity is set to
ContentGravity.TopStart
, so it’s text became not centred properly
a
Andrey Kulikov
04/01/2020, 10:58 PM
1 point was discussed in the thread under the next message(from Siyamed). about the point 2: is it a regression and it started working like this in dev08?
s
semoro
04/02/2020, 1:11 PM
Yep
semoro
04/02/2020, 1:11 PM
It is due migrating to Box instead of Container
cc @Andrey Kulikov
As I could remember, Container default layout gravity was
LayoutGravity.Center
vs
LayoutGravity.TopStart
of Box
LayoutGravity.Center
was more convenient to use, because I could just pad button, to make it bigger, while keeping widgets centered
Copy code
Button(modifier=Modifier.padding(20.dp), onClick={}) {
Text("Still in center")
}