Search code examples
androidtextview

Text styles used in Settings app for titles and subtitles


which text styles are used for the titles and subtitles in the Settings app? I tried using the following, but none of these produced the same result.

enter image description here

Title text

  • android:textAppearance="?android:titleTextAppearance"

  • android:textAppearance="?attr/title"

Subtitle text

  • android:textAppearance="?android:subtitleTextAppearance"

  • android:textAppearance="?attr/subtitle"


Solution

  • Text style is often not enough to achieve a particular style, you often need to set color too. In this case, I suspect they use Google Material Components styles. It's hard to judge the appropriate font size here given your font scale, but here's what I think they use:

    • Title

      android:textAppearance="?textAppearanceBody1"
      
    • Subtitle

      android:textAppearance="?textAppearanceBody2"
      android:textColor="@color/material_on_background_emphasis_medium" 
      

    enter image description here

    They also use a special font.