setMaxLines

@CanIgnoreReturnValue
open fun setMaxLines(@IntRange(from = 0) maxLines: Int): StaticLayoutBuilderCompat

Set maximum number of lines. This is particularly useful in the case of ellipsizing, where it changes the layout of the last line. The default is unlimited.

Return

this builder, useful for chaining

Parameters

maxLines

maximum number of lines in the layout

See also