There is a methods that multiply spacing between lines in TextView
I want to multiply it by 2 , but what is the default spacing value that it multiplies? 2px, 5px?
Thanks.
android:lineSpacingMultiplier governs the spacing between lines with a default of "1".
Just we need to add an attribute with your TextView that give the spacing with lines. These are –android:lineSpacingExtra, android:lineSpacingMultiplier – use these two attributes with your TextView in XML file. or Programatically call setter method of that attribute textView. setLineSpacing().
Line height usually means text size + "padding" top/bottom. So, if your designer write line height 19sp and text size 15sp, it means you need to have extra padding 4sp. 19sp - 15sp = 4sp. To implement it in your layout, use lineSpacingExtra attribute.
TextAppearance allows you to define text-specific styling while leaving a View 's style available for other uses. Note, however, that if you define any text attributes directly on the View or in a style, those values would override the TextAppearance values.
The value is a 17.1 percent of the text size.
But use 20 percent to be sure that letter like j or g appear correctly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With