I have to format the text as table in the email body of email client. But i read somewhere android doesn't
support
< table> tag. Is any other alternative is there for doing this? I tried a lot but still i am not finding any good solution. Please can anyone help me.
code
String body = "< table border="+"1"+">< tr>< td>row 1, cell 1< /td>"+ "< td>row 1, cell 2"+ "< /tr>"+ "< tr>"+ "< td>row 2, cell 1< /td>"+ "< td>row 2, cell 2< /td>"+ "< /tr>"+ "< /table>";
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/html");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject.getText());
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(body).toString());
startActivity(Intent.createChooser(emailIntent, "Email:"));
Actual Output is this
But I Expected output is similar to following: