これについては少し奇妙です。私のアプリでは、StringBuilder を使用して文字列を作成し、電子メールを作成しています。
今私がやろうとしているのは、テキストの一部をタブ付きで電子メールを送信することです (テキストは Word ドキュメントに転送され、これにより多くの編集が節約されます)。
したがって、私のコードでは、タブを含めるコードを書いています。次に例を示します。
message.append(component).append("\t\t\t\t\t\t\t\t\t\t\t\t").append(risk).append("\r\n");
次のコードを使用して電子メールを作成します。
private void sendEmail(String recipient, String subject, String message) {
try {
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..."));
} catch (ActivityNotFoundException e) {
// cannot send email for some reason
}
}
そのため、送信前に電子メールを見ると、タブが機能しているように見えますが、電子メールを受信するとタブがありません。ブー。
なぜこれが考えられるのでしょうか?