androidtextviewline-spacing

What's the difference between lineSpacingExtra and lineSpacingMultiplier?


I'm adding line spacing in my textview which spans multiple lines. What's the difference between android:lineSpacingExtra and android:lineSpacingMultiplier?

lineSpacingExtra with 2dp worked fine for me but I was wondering what the Multiplier does instead?


Solution

  • The difference is that android:lineSpacingExtra add extra spacing between lines of text of TextView and android:lineSpacingMultiplier work as scale factor for height of line space. in other words, each line height will be height*multiplier + extra