Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Additional Line Spacing Issue on Custom Font

Tags:

android

I use a custom font / custom Typeface for a TextView on my app. The TextView displays a paragraph of a text, but with the additional line spacing from the font itself it's rather irritating. So there's like a quite gap between one line with another on the paragraph. Can anybody know how to reduce the spacing through XML or programmatically?

like image 801
hectichavana Avatar asked Jan 16 '23 20:01

hectichavana


1 Answers

You can use the lineSpacingMultiplier attribute of your TextView to reduce/increase the spacing. Like this:

<TextView
    android:lineSpacingMultiplier="0.6"
    ...
    />
like image 199
Jave Avatar answered Jan 30 '23 19:01

Jave