Android : Send a table structure in mail (android code)

on Thursday, October 30, 2014


I'm trying to send a mail intend in android, which contains a table structure, with some test results.


For the generated text part (the main part of the mail), i tried to use a code like this:



Html.fromHtml(
new StringBuilder()

.append("<table style=\"width:100%\"><tr>\n" +
" <td>Jill</td>\n" +
" <td>Smith</td> \n" +
" <td>50</td>\n" +
" </tr>\n")
.append(
" <tr>\n" +
" <td>Eve</td>\n" +
" <td>Jackson</td> \n" +
" <td>94</td>\n" +
" </tr></table>")
.append("<small><p>More content</p></small>")
.toString());


It sends the mail, but all the information is like this: Jill Smith50.....


What shoud I change? Do you have any other idea? Thank you!


0 comments:

Post a Comment