What's the difference between lineSpacingExtra and lineSpacingMultiplier?

change picture change · Oct 8, 2013 · Viewed 29.9k times · Source

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?

Answer

Jans picture Jans · Oct 8, 2013

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