scana
05/10/2022, 12:26 PMCustomTheme {
// screen A content
}
CustomTheme {
// screen B content
}
Won't this recreate my fonts/colors all over again? What would be the best approach here?f.babic
05/10/2022, 12:29 PMscana
05/10/2022, 12:31 PMscana
05/10/2022, 12:31 PMf.babic
05/10/2022, 12:33 PMFilip Wiesner
05/10/2022, 12:48 PMscana
05/10/2022, 12:50 PMChris Sinco [G]
05/10/2022, 7:58 PMWon’t this recreate my fonts/colors all over again? What would be the best approach here?If you follow the guide, you essentially would just redo the MaterialTheme solution with your own colors/typography/shape. The values of that get passed down to all hierarchies via CompositionLocals. There shouldn’t be any overhead to resources being recreated. You just wrap the UIs you need with
CustomTheme
which would all be derived from wherever you declare that information, e.g. ui.theme.CustomTheme.ktChris Sinco [G]
05/10/2022, 7:59 PMChris Sinco [G]
05/10/2022, 7:59 PMChris Sinco [G]
05/10/2022, 8:01 PM