概述
I send an E-mail with data retrieved throughout my application like such:
String body = formatEmailBody();
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("message/rfc822");
i.putExtra(Intent.EXTRA_EMAIL , new String[]{"recipient@example.com"}); // Set receipient here
i.putExtra(Intent.EXTRA_SUBJECT, "Subject");
i.putExtra(Intent.EXTRA_TEXT , body);
try {
startActivity(Intent.createChooser(i, "Send mail..."));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(MainActivity.this, "There are no email clients installed.", Toast.LENGTH_SHORT).show();
}
Where formatEmailBody simply creates a String to be send as body of my email.
But a simple string is boring, how may I add bold / italic / bigger text?</
最后
以上就是笨笨画板为你收集整理的java怎么设置粗体和斜体,使Java中的电子邮件正文文本变为粗体,斜体和更大的全部内容,希望文章能够帮你解决java怎么设置粗体和斜体,使Java中的电子邮件正文文本变为粗体,斜体和更大所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复