bitkiller
09/05/2021, 3:04 PMtext
) of the dialog is just
Column
Box // clipped to Circle
Text
But with this ^ the content is being place over the dialog's title.bitkiller
09/05/2021, 3:06 PMColumn
Text
Box
bitkiller
09/05/2021, 3:08 PMAlertDialog(
onDismissRequest = {
onDismissRequest()
},
buttons = {
},
title = { Text("Select a color") },
text = {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center,
modifier = Modifier
.clickable {
onItemClick(myColors[0])
},
) {
Box(
modifier = Modifier
.size(50.dp)
.clip(CircleShape)
.background(Color(myColors[0].rgbValue))
)
Text(myColors[0].name)
}
}
)
(edited: formatting)Antimonit
09/05/2021, 5:34 PMtitle
and the first baseline of text
so that these baselines are always a fixed distance apart.
No matter what you put before the first Text()
within text
you everything is offset based on that first Text()
.
IMO, this will break in so many cases where text
is not just a simple message String. In our company, I've copy pasted the internal implementation and removed the code that was causing this.Antimonit
09/05/2021, 5:36 PMTextField()
on the first place. I could not believe that is supposed to be expected behavior. The tile and contents will jump up and down as you focus and unfocus the first TextField()
because the label is used as the first baseline of whole text
.Antimonit
09/05/2021, 5:37 PMAlertDialog
is broken that it does not update it's height when contents size changes. This can be reportedly fixed by passing some parameter via DialogParameters or something like usePlatformSizebitkiller
09/06/2021, 12:13 PMZoltan Demant
09/21/2021, 4:06 AM