https://kotlinlang.org logo
h

Harish Gupta

07/06/2020, 2:46 AM
Hi, Is there any way to set different background colors for the surface composable from the one defined in the color palette in the material theme? All surface composable background takes the same color as declared in the theme, but what if I want to have a different background color for different surface composable.
r

romainguy

07/06/2020, 3:27 AM
Surface has a color parameter you can set to change the background
h

Harish Gupta

07/06/2020, 3:46 AM
@romainguy ohh. Somehow i missed that.Thanks!. Anyway, I was trying to set the color by setting
drawBackground
function in modifier.