DeweyReed / Theme

🎨 An Experimental Theme Engine for Android
Apache License 2.0
93 stars 6 forks source link

New material design is coming! #3

Closed DeweyReed closed 4 years ago

DeweyReed commented 5 years ago

I notice something like colorOnPrimary has been added to material library. That definitely requires some work to adapt it.

Docs: https://github.com/material-components/material-components-android/blob/master/docs/theming/Color.md

DeweyReed commented 5 years ago

Changes:

  1. isDark will be removed because it's not a part of "App Theme".
  2. getMaterialThemeColorsTintList will be used to tint views instead of using some hacky ways.
  3. New values: colorPirmary, colorPrimaryVariant(previously colorPrimaryDark), colorOnPrimary, colorSecondary(previous colorAccent), colorSecondaryVariant, colorOnSecondary. Because other colors(background, color, error) don't belong to an app brand, currently there is no plan to support them.
  4. ...
DeweyReed commented 5 years ago

I'll use viewInflaterClass to create views and tint them.

https://helw.net/2018/08/06/appcompat-view-inflation/

DeweyReed commented 5 years ago

I think we can use something like Theme_android_textColor to get text color without hacking.

https://github.com/airbnb/paris