Expectation
Reality
(Please ignore the exact colours; Outer background colour is purple and inner background colour is red)
Compose code
@Preview
@Composable
fun MyCta() {
MaterialTheme() {
Box(
modifier = Modifier
.clip(RoundedCornerShape(50))
.padding(32.dp)
.background(MaterialTheme.colors.primary)
) {
Text(
"Tap to continue",
Modifier
.padding(8.dp)
.background(Color.Red)
,
color = MaterialTheme.colors.onPrimary
)
}
}
}
Is my expectation off and why?