Anyone had problems, when setting transparent back...
# compose
p
Anyone had problems, when setting transparent background to Snackbar?
l
That seems to be the shadow drawn by the elevation property. Have you tried setting the elevation to 0?
👍 1
p
yeah, just wanted to write that 🙂
works with 0 elevation
k
Elevation doesn't work well with translucent surfaces
3
a
Good solution is to use your color with alpha composed over surface color:
MaterialTheme.colors.onSurface.copy(alpha = 0.12f).compositeOver(color = MaterialTheme.colors.surface)
This way you get the same effect of alpha color but you can have elevation
🍺 1
It works on cards etc...