Take the 2-minute tour ×

I have a TextView where I want the line spacing to be less than 1.0, i.e. there will be less than the default amount of space between lines. I've done this:

    android:lineSpacingMultiplier="0.95" />

But in the text on the bottom line, the descenders (e.g. y's, g's, and p's) are being slightly chopped off. In other words, there are about 2 or 3 pixels worth of the bottom of those letters missing.

I've tried playing with margins and padding with no success. I seem to be able to fix the issue by using a specified height (with a little extra room) instead of wrap_content, but I'd like to avoid that if possible.

share|improve this question
add comment

1 Answer

Try this

from your code use textView.setLineSpacing()


from your xml use android:lineSpacingExtra="xxdp"

share|improve this answer
This may work. Not exactly what I want, though--I want the spacing to scale as a percentage of the font size, not as a dp value. I'll give it a try. –  parkerfath Jul 21 '12 at 1:07
This does NOT work as expected, because it adds an extra spacing on top of the existing line space, and if one uses a multiplier of 1 and a negative extra value, the text is cut-off just like before... –  Thomas Keller Sep 11 '12 at 14:06
add comment

Your Answer


