Android 如何增加文本视图中行之间的间距。?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11576002/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to increase the spacing between lines in a textview.?
提问by user1293519
Possible Duplicate:
Is it possible to style the android fonts styles with leading and tracking?
How to increase the spacing between lines in a textview in android?
如何增加android中textview中的行间距?
回答by Buda Gavril
from code you can use textView.setLineSpacing()
or from xml you can use android:lineSpacingExtra
来自您可以使用的代码textView.setLineSpacing()
或来自您可以使用的 xmlandroid:lineSpacingExtra
回答by Pravitha V
You can use lineSpacingExtra and lineSpacingMultiplier in your XML file.
您可以在 XML 文件中使用 lineSpacingExtra 和 lineSpacingMultiplier。
android:lineSpacingMultiplier="1.2"
or a number greater than 1
或大于 1 的数字
android:lineSpacingExtra="xxdp"
回答by Ionic? Biz?u
You can use this: lineSpacingExtra="xxdp"
你可以使用这个: lineSpacingExtra="xxdp"