Colton Idle
08/25/2021, 8:02 PMTopAppBar(
backgroundColor = Color.Red //Works as expected
backgroundColor = Color.Transparent //Doesn't work as expected
Nthily
08/25/2021, 8:22 PMColor.Transparent
will have elevation, you can set the elevation in the TopAppBar
parameter to 0.dp again, and it can be the expected effectColton Idle
08/25/2021, 8:29 PMChris Sinco [G]
08/25/2021, 9:43 PMcb
08/25/2021, 9:45 PMColton Idle
08/25/2021, 11:30 PMChris Sinco [G]
08/25/2021, 11:42 PMChris Sinco [G]
08/25/2021, 11:43 PMCard(
modifier = Modifier
.size(width = 192.dp, height = 56.dp),
.elevation = 12.dp,
backgroundColor = Color.Transparent,
) {
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center
) {
content()
}
}
Albert Chang
08/26/2021, 12:14 AMChris Sinco [G]
08/26/2021, 12:30 AMdrawBehind
modifier as an overlay, in cases where designers give you colors with transparency meant to be used as fill colors for a component that also has elevationChris Sinco [G]
08/26/2021, 12:31 AMColton Idle
08/26/2021, 1:07 AMAlbert Chang
08/26/2021, 1:32 AMColton Idle
08/26/2021, 1:49 AMAndrey Kulikov
08/26/2021, 12:00 PMColton Idle
08/26/2021, 12:24 PM