I'm trying to create a AlertDialog
that has rich content.
When I use the Html.fromHtml()
to set the message text like:
AlertDialog.Builder adb = new AlertDialog.Builder(this);
adb.setTitle("title");
adb.setMessage(Html.fromHtml(text));
it only allows me basic HTML elements like <b>
(Bold) and <i>
(Italic).
When I use a WebView
like
WebView webView = new WebView(this);
myWebView.loadData(webContent, "text/html", "utf-8");
AlertDialog.Builder adb = new AlertDialog.Builder(this);
adb.setView(webView);
I lose the default Android style.
What can I do to get Rich context, like <ul>
inside an AlertDialog
?.