TextStyle

data class TextStyle @JvmOverloads constructor(val size: Int = 14, @ColorLong val color: Long = 4278190080, val textAlign: TextAlign = TextAlign.Start, val font: Font = Font.Default, val fontStyle: FontStyle = FontStyle.Normal, val fontWeight: FontWeight = FontWeight.Normal, val maxLines: Int = Int.MAX_VALUE, val maxLength: Int? = null, var lineHeight: Int? = null)

Constructors

Link copied to clipboard
constructor(size: Int = 14, @ColorLong color: Long = 4278190080, textAlign: TextAlign = TextAlign.Start, font: Font = Font.Default, fontStyle: FontStyle = FontStyle.Normal, fontWeight: FontWeight = FontWeight.Normal, maxLines: Int = Int.MAX_VALUE, maxLength: Int? = null, lineHeight: Int? = null)

Properties

Link copied to clipboard
val color: Long = 4278190080

The 32-bit ARGB text color. F.e. black color 0xFF000000.

Link copied to clipboard
val font: Font

Defines font family.

Link copied to clipboard

Defines font inputStyle, normal or italic.

Link copied to clipboard

Defines font weight for the text field.

Link copied to clipboard

Line height in sp.

Link copied to clipboard
val maxLength: Int? = null

Optional maximum symbols limit. Applicable for editable text fields.

Link copied to clipboard

Maximum number of lines for the text to span, wrapping if necessary. If the text exceeds the given number of lines, it will be truncated.

Link copied to clipboard
val size: Int = 14

Text size in sp.

Link copied to clipboard

Defines how to align text horizontally.