小编Chr*_*sic的帖子

发送电子邮件时更改文本(字符串)的颜色

当我将其输出到电子邮件时,我正在尝试更改文本的颜色(字符串).我的代码是:

String appdata = "%" + txtFromSpinner + location.getText() + "%" + date.getText()+ "%" + start.getText() + "%" + finish.getText() + "%" + lunch.getText() + "%" + details.getText();
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{"payrolldirectgib@gmail.com"});
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Timesheet/Parte de horas");
emailIntent.putExtra(Intent.EXTRA_TEXT, appdata +sep+ "Please send this email."+sep+ "Your timesheet details are included in it."+sep+ "Thank you."+sep+ "Regards,"+sep+ "Admin Department."+sep+ "Payroll Direct.");
emailIntent.setType("message/rfc822");
startActivity(emailIntent);
Run Code Online (Sandbox Code Playgroud)

我希望字符串"appdata"在电子邮件消息框中显示为红色.

可以这样做,怎么做?

先感谢您.

java string android colors

6
推荐指数
1
解决办法
1294
查看次数

标签 统计

android ×1

colors ×1

java ×1

string ×1