android:lineSpacingMultiplier doesn't work in android:textAppearance
For whatever reason android:lineSpacingMultiplier
doesn't work as an item within your textAppearance
. You'll either have to set it directly as a TextView
attribute (using android:lineSpacingMultiplier
), or create a regular style which "wraps" setting the textAppearance
and lineSpacingMultiplier
Create a style
<style name="TextBody1">
<item name="android:textAppearance">@style/TextAppearance.AppCompat.Body1</item>
<item name="android:lineSpacingMultiplier">1.25</item>
</style>
or
<style name="TextBody1" parent="TextAppearance.AppCompat.Body1">
<item name="android:lineSpacingMultiplier">1.25</item>
</style>
and then apply via style
instead of android:textAppearance
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="This is body 1\nThis is body 1"
style="@style/TextBody1"
/>