LineHeightStyle


The configuration for line height such as alignment of the line in the provided line height, whether to apply additional space as a result of line height to top of first line top and bottom of last line.

The configuration is applied only when a line height is defined on the text.

trim feature is available only when PlatformParagraphStyle.includeFontPadding is false.

Please check Trim and Alignment for more description.

Summary

Nested types

Defines how to align the line in the space provided by the line height.

Defines whether the space that would be added to the top of first line, and bottom of the last line should be trimmed or not.

Public companion properties

LineHeightStyle

The default configuration for LineHeightStyle:

Cmn

Public constructors

Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

LineHeightStyle.Alignment

defines how to align the line in the space provided by the line height.

Cmn
LineHeightStyle.Trim

defines whether the space that would be added to the top of first line, and bottom of the last line should be trimmed or not.

Cmn

Public companion properties

Default

val DefaultLineHeightStyle

The default configuration for LineHeightStyle:

Public constructors

LineHeightStyle

LineHeightStyle(
    alignment: LineHeightStyle.Alignment,
    trim: LineHeightStyle.Trim
)
Parameters
alignment: LineHeightStyle.Alignment

defines how to align the line in the space provided by the line height.

trim: LineHeightStyle.Trim

defines whether the space that would be added to the top of first line, and bottom of the last line should be trimmed or not. This feature is available only when PlatformParagraphStyle.includeFontPadding is false.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

alignment

val alignmentLineHeightStyle.Alignment

defines how to align the line in the space provided by the line height.

trim

val trimLineHeightStyle.Trim

defines whether the space that would be added to the top of first line, and bottom of the last line should be trimmed or not. This feature is available only when PlatformParagraphStyle.includeFontPadding is false.