在电子邮件正文的Android HTML显示 [英] Html Display in Email Body Android
本文介绍了在电子邮件正文的Android HTML显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要显示在电子邮件正文中的表。在code是如下图所示。
I want to display a table in email body. The code is as below.
stringBuilder.append("<html>" +
"<body>"+
"<table border=\"1\">"+
"<tr>"+
"<th>Name</th>"+
"<th>Telephone</th>"+
"<th>Telephone</th>"+
"</tr>"+
"<tr>"+
"<td>Bill Gates</td>"+
"<td>555 77 854</td>"+
"<td>555 77 855</td>"+
"</tr>"+
"</table>"+
"</body>"+
"</html>");
final Intent intent = new Intent(android.content.Intent.ACTION_SEND);
intent.setType("text/html");
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Checklist Information");
intent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(stringBuilder.toString()));
但该表没有显示,而不是一个简单的文本显示在邮件正文。
But the table is not showing, rather a simple text is showing in mail body.
请帮助我。
推荐答案
的表
HTML标记不支持Html.fromHtml()。请参见这里
the table
html tag is not supported by Html.fromHtml(). See here
这篇关于在电子邮件正文的Android HTML显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文