android:textAppearance
allows you to apply an additional layer of styling for certain attributes on text views. I'm wondering whether the flexibility of this feature outweighs its complexity.
- Is
android:textAppearance
required for any technical or visual reason? - What might be the consequences of relying solely on
style
throughout a project and omitting the use ofandroid:textAppearance
in layouts? - What if it were omitted from styles too?
Here's two guides that recommend the use of android:textAppearance
:
Styling Views on Android (Without Going Crazy)
TextAppearance allows you to merge two styles for some of the most commonly modified text attributes. Take a look at all your styles: how many of them only modify how the text looks? In those cases, you could instead just modify the TextAppearance.
Best practices for happy Android resources
To ensure consistent-looking TextViews, do not define any of the TextAppearance attributes in a normal style, but always set a TextAppearance from your library on that style’s android:textAppearance field.