0

There will be a blank between the content text and the border of the TextView, even if the padding is 0. And if the height of the TextView and the content text is set to a same value, the text will not be completely displayed.

So, what's the height of blank between the content text and the border of the TextView?

ZhangLei
  • 333
  • 5
  • 16

1 Answers1

1

The extra spacing is built into the font. It's there to accomodate special characters that are very tall.

Similar question: How to remove the top and bottom space on textview of Android

Adding android:includeFontPadding="false" may help a little, but I've found it doesn't do much.

Community
  • 1
  • 1
Kyle Ivey
  • 5,552
  • 1
  • 21
  • 35
  • Thank you for your reply! The `android:includeFontPadding="false"` actually reduces the height of the space. But, there is still some space between the text and the border. I don't care whether the space exists or not, but is there a way to abtain the size of this space? And then I can place the text exactly where the designer want.. – ZhangLei Jun 26 '14 at 06:10
  • I know the feeling. If the text is static, setting a negative margin may do the trick. Otherwise, see this answer: http://stackoverflow.com/a/6573535/2113225 – Kyle Ivey Jun 27 '14 at 07:28