Is there a good documentation on Android styles/themes with screenshots?

Viewed 72

I'm looking for a good documentation on android styles with screenshots and the screenshots are very important. I found a number pages on the internet, a number of examples but they cover very particular things and I want to understand everything. Some of them mention Android source styles from this repository https://github.com/aosp-mirror/platform_frameworks_base/tree/master/core/res/res/values for example. That is already a good start to at least know the complete list of resource ids. What is completely missing is explanation of each such id. For example if you look inside styles_material.xml. There is

<style name="TextAppearance.Material.Subhead">
    <item name="textSize">@dimen/text_size_subhead_material</item>
    <item name="fontFamily">@string/font_family_subhead_material</item>
    <item name="textColor">?attr/textColorPrimary</item>
</style>

how am I supposed to know there that TextAppearance.Material.Subhead is used? I cannot guess by the name TextAppearance.Material.Subhead where it will be used. I'm trying to find screenshots explaining that if you change these style values with this names it will be visually reflected there in that way. Is there such thing?

Also, I don't understand about those names of style files. What is the difference between styles_material.xml and styles_holo.xml? When is used one and another?

1 Answers

In the last years there were different themes in Android, Holo, Material, AppCompat and now a MaterialComponents theme.
Some of them are provided by the Android system, other are provided by libraries (like AppCompat and MaterialComponents libraries) and each of them are based on different styles and different names.

You can start from the latest theme Theme.MaterialComponents.
Here you can find a good and detailed doc.

In particular the Typography Theming is based on the material design guidelines.

enter image description here

For each category you can find a style:

enter image description here

Finally can navigate through the source code and check all the typography styles:

  <style name="TextAppearance.MaterialComponents.Subtitle1" parent="TextAppearance.AppCompat.Subhead">
    <item name="fontFamily">sans-serif</item>
    <item name="android:fontFamily">sans-serif</item>
    <item name="android:textStyle">normal</item>
    <item name="android:textAllCaps">false</item>
    <item name="android:textSize">16sp</item>
    <item name="android:letterSpacing">0.009375</item>
  </style>
Related