Stylianos Gakis
06/26/2023, 3:27 PMStylianos Gakis
06/26/2023, 3:27 PMStylianos Gakis
06/26/2023, 3:29 PMBox(
contentAlignment = Alignment.Center,
modifier = Modifier
.size(72.dp)
.background(Color(0xFFF5F5F5), CircleShape) // tried background before shadow
.shadow(
elevation = 10.dp,
shape = CircleShape,
)
.background(Color(0xFFF5F5F5), CircleShape) // tried background after shadow too
) {
Canvas(Modifier.size(32.dp)) {
drawCircle(recordingColor)
}
}
I get this result insteadStylianos Gakis
06/26/2023, 3:30 PMOleksandr Balan
06/26/2023, 3:34 PMStylianos Gakis
06/26/2023, 3:37 PMandroidx.compose.ui.draw
and I am using normal Boxes everywhere.
Even tried something like this
Box(
contentAlignment = Alignment.Center,
) {
Box(
modifier = Modifier
.size(72.dp)
.shadow(
elevation = 20.dp,
shape = CircleShape,
clip = false,
),
)
Box(
contentAlignment = Alignment.Center,
modifier = Modifier.size(72.dp).background(Color(0xFFF5F5F5), CircleShape),
) {
Box(
Modifier.size(32.dp).background(MaterialTheme.colorScheme.error, CircleShape),
)
}
}
Same result 😅
I am just really interested how the image vector doesn’t get affected by this when calling it using just Image(painter = painterResource(R.drawable.ic_record))
Stylianos Gakis
06/26/2023, 3:41 PMStylianos Gakis
06/26/2023, 3:45 PMOleksandr Balan
06/26/2023, 3:45 PM