TextView设置行间距和字间距
程序员文章站
2022-11-05 10:00:01
一、设置行间距android:lineSpacingExtra设置行间距,尺寸值是一个浮点数,后跟一个单位,例如“ 14.5sp”Extra spacing between lines of text. Must be a dimension value, which is a floating point number appended with a unit such as “14.5sp”.Available units are: px (pixels), dp (density-inde...
一、设置行间距
-
android:lineSpacingExtra
设置行间距,尺寸值是一个浮点数,后跟一个单位,例如“ 14.5sp”
Extra spacing between lines of text. Must be a dimension value, which is a floating point number appended with a unit such as “14.5sp”.Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). -
android:lineSpacingMultiplier
设置行间距乘数。必须为浮点值,例如“ 1.2”
Extra spacing between lines of text, as a multiplier.Must be a floating point value, such as “1.2”.
二、设置字间距
-
android:letterSpacing
设置字母间距乘数。必须为浮点值,例如“ 1.2”
Text letter-spacing.Must be a floating point value, such as “1.2”.
本文地址:https://blog.csdn.net/qq_36881363/article/details/107511422