parseAsHtml

inline fun String.parseAsHtml(flags: Int = FROM_HTML_MODE_LEGACY, imageGetter: Html.ImageGetter? = null, tagHandler: Html.TagHandler? = null): Spanned(source)

Returns a Spanned from parsing this string as HTML.

Parameters

flags

Additional option to set the behavior of the HTML parsing. Default is set to Html.FROM_HTML_MODE_LEGACY which was introduced in API 24.

imageGetter

Returns displayable styled text from the provided HTML string.

tagHandler

Notified when HTML tags are encountered a tag the parser does not know how to interpret.

See also