Afzal Najam
10/26/2020, 1:42 AMdrawShadow
modifier supposed to change the opacity of the whole Box?
Changing the 0.3f
opacity changes the opacity of the whole box and its contents. Simplified example:
@Composable
private fun StrangeButton() {
Box(
modifier = Modifier.then(
Modifier.drawShadow(
elevation = 4.dp,
opacity = 0.3f
)
).then(
Modifier.background(
color = Color.Green
)
)
) {
Image(
asset = Icons.Default.Person,
colorFilter = ColorFilter.tint(Color.White)
)
}
}
Zach Klippenstein (he/him) [MOD]
10/26/2020, 1:45 AMZach Klippenstein (he/him) [MOD]
10/26/2020, 1:45 AMModifier
.drawShadow(…)
.background(…)
Afzal Najam
10/26/2020, 2:05 AM