Hi everybody. In my app, I need to display a Priva...
# compose
d
Hi everybody. In my app, I need to display a Privacy Notice stored in an HTML file. On Android I can do smth like
Copy code
policyView.text = HtmlCompat.fromHtml(htmlText, HtmlCompat.FROM_HTML_MODE_COMPACT)
How can I achieve the same result with
Text
from the compose library?
s
Text doesn't have it. You will have to convert that spannable into an annotated string
I suspect that we will ever have html to text/annotated string conversion.
d
Well, yes. I was sure I need a conversion to annotated string, but hoped that such a function already exists.
s
What we plan is to provide one from spannable to annotated, and vice versa. But not html for now.
👍 1