Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Let's use Material Theming

Nabe
February 15, 2019

Let's use Material Theming

Nabe

February 15, 2019
Tweet

More Decks by Nabe

Other Decks in Design

Transcript

  1. 話すこと ・Material Design と Material Theming について基本的なこと を話します ・Android を参考に

    Material Theming を使うとどのようになる のか紹介しますが、細かな実装の話はしません ・知ってる人もそうでない人も Material Design に興味を持って もらえたら嬉しいです
  2. Color Theming の適用 <color name="colorPrimary">#008577</color> <color name="colorPrimaryVariant">#00574B</color> <color name="colorSecondary">#03DAC6</color> <color

    name="colorSecondaryVariant">#018786</color> <color name="colorBackground">#FFFFFF</color> <color name="colorSurface">#FFFFFF</color> <color name="colorError">#B00020</color> <color name="colorOnPrimary">#FFFFFF</color> <color name="colorOnSecondary">#000000</color> <color name="colorOnBackground">#000000</color> <color name="colorOnSurface">#000000</color> <color name="colorOnError">#FFFFFF</color>
  3. Shape Theming の適用 <style name="AppSmallShapeAppearance" parent="ShapeAppearance.MaterialComponents.SmallComponent"> <item name="cornerFamily">cut</item> </style> <style

    name="AppMediumShapeAppearance" parent="ShapeAppearance.MaterialComponents.MediumComponent"> <item name="cornerFamily">cut</item> </style> <style name="AppLargeShapeAppearance" parent="ShapeAppearance.MaterialComponents.LargeComponent"> <item name="cornerFamily">cut</item> </style>
  4. Shape Theming の適用 ・Small Components Button、Chip、FAB、Text Field、Snackbar … ・Medium Components

    Card、Dialog、Image list item、Menu ・Large Components Backdrop、Data table、Bottom sheet、Nav drawer… https://material.io/design/shape/applying-shape-to-ui.html#shape-scheme
  5. Typography Theming の適用 <style name="AppTextAppearanceHeadLine1" parent="TextAppearance.MaterialComponents.Headline1"> <item name="fontFamily">@font/lemonada</item> <item name="android:fontFamily">@font/lemonada</item>

    </style> <style name="AppTextAppearanceHeadLine2" parent="TextAppearance.MaterialComponents.Headline2"> <item name="fontFamily">@font/lemonada</item> <item name="android:fontFamily">@font/lemonada</item> </style> ……