TextView中没有任何默认填充 [英] TextView without any default padding
问题描述
可能重复:结果
<一href=\"http://stackoverflow.com/questions/12172210/i-want-textview-without-any-defalut-padding-while-increasing-size-of-textview\">I希望TextView中没有任何默认填充,同时增加的TextView的大小
块引用>我想在TextView的删除默认填充。当i升高的TextView的自动然后其填充大小的尺寸增大。即使我设置的文本显示为@null的背景。我只是想表明没有任何填充只有文字。我查看看起来是这样的第一印象,我想表现出像第二图像。
这首链接显示的看法是显示。
http://www.imageurlhost.com/images/487vskfx1aj01f9e9g40.png
这是我想说明没有给予任何-margin这第二个链接显示布局视图
http://www.imageurlhost.com/images/ijuyxpcub1oqy1w66h.png
解决方案这就是所谓的字体填充。 includeFontPadding =FALSE 或XML属性
Android的;你可以用
mTextView.setIncludeFontPadding(假)禁用p>
Possible Duplicate:
I want textView without any default padding while increasing size of textViewI want to remove default padding on TextView. When i increase the size of TextView then its padding size increases automatically. even i set background of text View as "@null". i just want to show only text without any padding. my View looks like this first images and i want to show like second images.
This First link shows View is displaying.
http://www.imageurlhost.com/images/487vskfx1aj01f9e9g40.png
This second link show Layout view that i want to show without giving any -margin
http://www.imageurlhost.com/images/ijuyxpcub1oqy1w66h.png
解决方案It's called font padding. You can disable it with
mTextView.setIncludeFontPadding(false);
or xml attributeandroid:includeFontPadding="false"
这篇关于TextView中没有任何默认填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!