Sunday, 15 January 2012

email - Tabs in StringBuilder don't work when sending an e-mail (Android)! -



email - Tabs in StringBuilder don't work when sending an e-mail (Android)! -

bit of weird on this; app using stringbuilder build strings create e-mail.

now trying send e-mail parts of text tabbed (the text transferred word document , save lot of editing).

so in code writing code include tabs, example:

message.append(component).append("\t\t\t\t\t\t\t\t\t\t\t\t").append(risk).append("\r\n");

i utilize next code build e-mail:

private void sendemail(string recipient, string subject, string message) { seek { final intent emailintent = new intent(android.content.intent.action_send); emailintent.settype("text/html"); emailintent.settype("message/rfc822"); if (recipient != null) emailintent.putextra(android.content.intent.extra_email, new string[]{recipient}); if (subject != null) emailintent.putextra(android.content.intent.extra_subject, subject); if (message != null) emailintent.putextra(android.content.intent.extra_text, message); startactivity(intent.createchooser(emailintent, "send mail...")); } grab (activitynotfoundexception e) { // cannot send email reason } }

so when @ e-mail before sending, tabs seem have worked, when receive e-mail, not there. boo.

any ideas why might be?

just have tried code, seems tab symbols trimmed while email sends. tried way , works fine (in gmail), ugly solution

private string tab(){ homecoming " "; // homecoming 4 space characters } message.append(tab()+tab+tab());

android email tabs formatting

No comments:

Post a Comment