https://kotlinlang.org logo
#compose
Title
# compose
a

Alex Gabor

06/02/2021, 8:04 AM
It uses
JetsnackColors
, while
MaterialTheme
needs
Colors
.
You can define your own theming system. See https://developer.android.com/jetpack/compose/themes#custom-design
z

Zan Skamljic

06/02/2021, 8:25 AM
Was there a specific reason this was done in JetSnack? are there things that could not be achieved by using MaterialTheme?
1
Perhaps should the apps consider this?
Or is it just used to specify a set of colors in addition to MaterialTheme, to specify colors for stuff that MaterialTheme doesn't have?
a

Alex Gabor

06/02/2021, 8:34 AM
I didn’t check if it could have been achieved only with Material Theme, but in my opinion the sample shows that you are not limited to what Material Theme provides. So the way I see it is you can choose: 1. Use MaterialTheme if it fits your needs 2. Use MaterialTheme so that you can use the material components, and add custom stuff like JetSnack does with colors. 3. Define a completely diferent Theme if Material Theme doesn’t fit you needs and/or you don’t want to use Material Components.
4 Views