Mehdi Haghgoo
02/08/2022, 3:41 PMAlbert Chang
02/08/2022, 4:32 PMMaterialTheme
in S1FoundationTheme
right? In that case MaterialTheme
is the child of S1FoundationTheme
.Mehdi Haghgoo
02/08/2022, 4:46 PMChris Sinco [G]
02/08/2022, 5:08 PMS1FoundationTheme
code look like? I’m guessing it’s wrapping MaterialTheme
which is why it shows up like this in the Layout Inspector hierarchyMehdi Haghgoo
02/08/2022, 5:10 PMsetContent {
S1FoundationTheme {
MainScreen()
}
}
Chris Sinco [G]
02/08/2022, 5:13 PMChris Sinco [G]
02/08/2022, 5:14 PMui/theme/Theme.kt
since it’s generated from Android StudioMehdi Haghgoo
02/08/2022, 5:16 PM@Composable
fun S1FoundationTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
val colors = if (darkTheme) {
DarkColorPalette
} else {
LightColorPalette
}
MaterialTheme(
colors = colors,
typography = Typography,
shapes = Shapes,
content = content
)
}
Chris Sinco [G]
02/08/2022, 5:22 PMMehdi Haghgoo
02/08/2022, 5:23 PMChris Sinco [G]
02/08/2022, 5:25 PMChris Sinco [G]
02/08/2022, 5:25 PMMehdi Haghgoo
02/08/2022, 5:26 PMChris Sinco [G]
02/08/2022, 5:31 PMChris Sinco [G]
02/08/2022, 5:31 PMMehdi Haghgoo
02/08/2022, 5:37 PM