TextView-line spacing and letter spacing

One, set the line spacing

  • android:lineSpacingExtra

    Set the line spacing, the size value is a floating point number followed by a unit, such as "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

    Set the line spacing multiplier. Must
    be a floating point value, such as “1.2” Extra spacing between lines of text, as a multiplier.Must be a floating point value, such as “1.2”.

Second, set the word spacing

  • android:letterSpacing

    Set the letter spacing multiplier. Must be a floating point value, for example, "1.2 "
    the Text Letter spacing.Must BE-A Floating Point value, SUCH AS "1.2."

Guess you like

Origin blog.csdn.net/qq_36881363/article/details/107511422