BasicReadMoreText
Basic element that displays text with read more. Typically you will instead want to use com.webtoonscorp.android.readmore.material.ReadMoreText, which is a higher level Text element that contains semantics and consumes style information from a theme.
Parameters
The text to be displayed.
whether this text is expanded or collapsed.
Modifier to apply to this layout node.
called when this text is clicked. If null
, then this text will not be interactable, unless something else handles its input events and updates its state.
a padding around the text.
Style configuration for the text such as color, font, line height etc.
Callback that is executed when a new text layout is calculated. A TextLayoutResult object that callback provides contains paragraph information, size of the text, baselines and other details. The callback can be used to add additional decoration or functionality to the text. For example, to draw selection around the text.
Whether the text should break at soft line breaks. If false, the glyphs in the text will be positioned as if there was unlimited horizontal space. If softWrap is false, readMoreOverflow and TextAlign may have unexpected effects.
The read more text to be displayed in the collapsed state.
An optional 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 according to readMoreOverflow. If it is not null, then it must be greater than zero.
How visual overflow should be handled in the collapsed state.
Style configuration for the read more text such as color, font, line height etc.
The read less text to be displayed in the expanded state.
Style configuration for the read less text such as color, font, line height etc.
A clickable area of text to toggle.