fabio.carballo
10/16/2020, 8:29 AMComponent
to use to just represent the background
?
I understand the in MaterialTheme the Surface
has a similar goal, but it takes by default the surfaceColor
. In my case where I want the same practical use but so that the background color is always backgroundColor
. From looking at usages, it seems only Scaffold
actually uses this color, but internally still uses a Surface
and changes the background color.nickbutcher
10/16/2020, 10:41 AMSurface(color = MaterialTheme.colors.background,…
or 2 Create a composable wrapping surface:
@Composable fun BackgroundSurface(color: Color = MaterialTheme.colors.background, …) {
Surface(color = color, …)
}
fabio.carballo
10/16/2020, 12:22 PM