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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:06:20  来源:igfitidea点击:

How to increase the spacing between lines in a textview.?

android

提问by user1293519

Possible Duplicate:
Is it possible to style the android fonts styles with leading and tracking?

可能的重复:
是否可以使用前导和跟踪来设置 android 字体样式?

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"