0

My graphic designer instructed my team to format a text box with a 1.5 line height.

In CSS, I would express this as:

line-height: 150%;

What is the Android equivalent to the web line-height property?

Duplicate?

I think that this question is not a duplicate of android textview padding between lines, but rather a narrower question. The other one refers to line spacing in general, and this one refers to proportional, css-like spacing.

Community
  • 1
  • 1
Adam Matan
  • 128,757
  • 147
  • 397
  • 562

1 Answers1

2

You can use lineSpacingExtra and lineSpacingMultiplier in your XML file.

From Stackoverflow

Also consider reading http://developer.android.com/reference/android/widget/TextView.html

Community
  • 1
  • 1
KMSTR
  • 136
  • 4
  • Thanks. The `lineSpacingMultiplier` is probably the exact equivalent. The direct link is http://developer.android.com/reference/android/widget/TextView.html#attr_android:lineSpacingMultiplier – Adam Matan Apr 27 '15 at 12:18
  • lol. how can I do equivalent. formulas etc? – filthy_wizard Apr 25 '17 at 10:46