FormatSectionBuilder

class FormatSectionBuilder(content: Expression)

Builder for a Formatted Section.

Parameters

content

the content of the FormattedSection as a text string literal or an image as Expression

Constructors

FormatSectionBuilder
Link copied to clipboard
fun FormatSectionBuilder(content: Expression)

Functions

build
Link copied to clipboard
fun build(): List<Expression>

Build a list of expressions as one format section.

fontScale
Link copied to clipboard
fun fontScale(fontScale: Expression): Expression.FormatSectionBuilder
fun fontScale(fontScale: Double): Expression.FormatSectionBuilder
fun fontScale(block: Expression.ExpressionBuilder.() -> Unit): Expression.FormatSectionBuilder

If set, the font-scale argument specifies a scaling factor relative to the text-size specified in the root layout properties.

textColor
Link copied to clipboard
fun textColor(textColor: Expression): Expression.FormatSectionBuilder
fun textColor(block: Expression.ExpressionBuilder.() -> Unit): Expression.FormatSectionBuilder
fun textColor(@ColorInt textColor: Int): Expression.FormatSectionBuilder
fun textColor(textColor: String): Expression.FormatSectionBuilder

If set, the text-color argument overrides the color specified by the root paint properties.

textFont
Link copied to clipboard
fun textFont(textFont: Expression): Expression.FormatSectionBuilder
fun textFont(block: Expression.ExpressionBuilder.() -> Unit): Expression.FormatSectionBuilder
fun textFont(textFont: List<String>): Expression.FormatSectionBuilder

If set, the text-font argument overrides the font specified by the root layout properties.