Search code examples
androidmaterial-designandroid-appcompatmaterial-components-androidmaterial-components

Definition of TextAppearance.MaterialComponents.Body2?


I am currently digging through the code of the Google IO 2019 android app. In the styles.xml line 77 it says:

<style name="TextAppearance.IOSched.Body2" parent="TextAppearance.MaterialComponents.Body2" />

But where can I find the definition of the parent TextAppearance.MaterialComponents.Body2? I already have the IO project locally in my Android Studio, in case that helps to resolve what is behind that definition.

Thanks!


Solution

  • It is defined in the Material Components library.

    Currently it is:

      <style name="TextAppearance.MaterialComponents.Body2" parent="TextAppearance.AppCompat.Body1">
        <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">14sp</item>
        <item name="android:letterSpacing">0.0178571429</item>
      </style>
    

    You can find here the latest implementation.