安卓的TextView:删除间距和边距的顶部和底部 [英] Android: TextView: Remove spacing and padding on top and bottom
问题描述
当我有一个的TextView
与 \文本ñ
,,在右边,我有两个单线
的TextView
S,下面的一个其他的,中间没有间隔。我已经设置了下面的所有三个的TextView
秒。
安卓lineSpacingMultiplier =1机器人:lineSpacingExtra =0pt机器人:paddingTop =0pt机器人:paddingBottom会=0pt
左边的第一行的TextView
排队完美的右上方的TextView
。左的TextView
的第二行是比右下角的的TextView
的第二行高一点。
似乎有某种隐藏的填充顶部和的TextView
S的底部。我怎么能删除?
setIncludeFontPadding(布尔includepad)
或 XML
这将是:
安卓includeFontPadding =假
设置是否对的TextView
包括额外的顶部和底部填充,以腾出空间口音说上面去正常的上升和下降。默认值是true。
When I have a TextView
with a \n
in the text,, on the right I have two singleLine
TextView
s, one below the other with no spacing in between. I have set the following for all three TextView
s.
android:lineSpacingMultiplier="1" android:lineSpacingExtra="0pt" android:paddingTop="0pt" android:paddingBottom="0pt"
The first line of the left TextView
lines up perfectly with the top right TextView
. The second line of the left TextView
is a little higher than the second line of the bottom right TextView
.
It seems that there is some kind of hidden padding on the top and the bottom of the TextView
s. How can I remove that?
setIncludeFontPadding (boolean includepad)
or in XML
this would be:
android:includeFontPadding="false"
Set whether the TextView
includes extra top and bottom padding to make room for accents that go above the normal ascent and descent. The default is true.
这篇关于安卓的TextView:删除间距和边距的顶部和底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!