Colton Idle
03/10/2021, 5:03 PMColton Idle
03/10/2021, 5:04 PMRow() {
Spacer(
modifier = Modifier
.height(500.dp)
.aspectRatio(4 / 3f)
.background(aColorValue)
)
Text(
text = "one",
Modifier
.fillMaxHeight(),
color = MyTheme.colors.one,
)
}
Colton Idle
03/10/2021, 5:05 PMText
to match the spacer.Louis Pullen-Freilich [G]
03/10/2021, 5:16 PMText(
modifier = Modifier.fillMaxHeight().wrapContentHeight()
)
Colton Idle
03/10/2021, 5:18 PMKari Kähkönen
03/10/2021, 5:20 PMRow(verticalAlignment = Alignment.CenterVertically) {
Spacer(
modifier = Modifier
.height(500.dp)
.aspectRatio(4 / 3f)
.background(aColorValue)
)
Text(
text = "one",
color = MyTheme.colors.one,
)
}
Colton Idle
03/10/2021, 5:23 PMColton Idle
03/10/2021, 5:25 PMLouis Pullen-Freilich [G]
03/10/2021, 5:26 PMtextAlign
only for horizontal alignment? I'm not sure how it relates to vertical alignment in your example, why do you need the text to still be 500.dp high?Kari Kähkönen
03/10/2021, 5:28 PMRow {
Spacer(
modifier = Modifier
.height(500.dp)
.aspectRatio(4 / 3f)
.background(aColorValue)
)
Text(
text = "one",
color = MyTheme.colors.one,
modifier = Modifier.align(Alignment.CenterVertically)
)
}
Kari Kähkönen
03/10/2021, 5:30 PMColton Idle
03/10/2021, 6:09 PM