I have a TextView
with about 10 rows. I want to have the lines more separated from each other. I can't seem to find an attribute for doing that. I tried with: android:includeFontPadding="true"
but the text got all weird like stretched or something. Is there any attribute that I don't know about to do that?
Thanks in advance.
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().
Adding android:lineSpacingMultiplier="0.8" can make the line spacing to 80%. Show activity on this post. You can use TextView. setLineSpacing(n,m) function.
When you have a text that's longer than one line, then the TextView will automatically put the text in multiple lines. When you set the layout_width and layout_height as wrap_content or match_parent , then the TextView widget will use all the available space to display the text you specified as its content.
Use android:lineSpacingMultiplier="1.2" or some number greater than 1
You can use android:lineSpacingExtra="xxdp"
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