欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

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

相关标签: Android