Open markusrubey opened 5 years ago
@markusrubey I tried using it in the Careem app and replaced all components to use the new MaterialComponents styles but there are some things which were not supported (like buttons drawable background, only color was available) so I had to change it back to use the regular Theme. Not sure if they fixed these.
We currently set
Theme.AppCompat.Light
as base theme, which is nice, but I thinkTheme.MaterialComponents.DayNight
is quite a bit more advanced, more flexible and faster to implement when dealing with fancy designs.Ideally this is not just about switching to another theme, but rather to streamline our entire design-to-code work flow - would be great to get our designers on board with this.
Material could help us in following aspects:
Colors:
We currently do define colorPrimary, colorPrimaryDark and colorAccent, but Material offers way more in that regard. By defining following values we pretty much cover coloring of all UI components there are. It would make sense to have our designers define those by default.
Text:
Same goes for text appearance. Defining a app wide type system would make it easier for us to maintain text styling. Material defines following values:
Shape:
This one is quite interesting. Instead of fiddling with custom xml drawables and outline provider we could just define shapes when needed.
Dark Theme
Material's DayNight theme also supports Android Q's light - dark mode.
_
I guess this is issue is mainly to start a discussion around that topic. There is some sort of a template project from Google showcasing a bunch of things under https://github.com/material-components/material-components-android/tree/master/material-theme-builder