在分享Android版Gmail撰写大胆的新行数据 [英] Writing data in new line with bold in sharing gmail android
本文介绍了在分享Android版Gmail撰写大胆的新行数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在与Gmail共享数据,以大胆和新的线样式来写。我曾尝试与\\ n或你可以说,但我不能让我产生code低于..
i want to write with bold and new line style while sharing data with gmail. i have tried with \n or you can say but i could not get result my code is below ..
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("plain/text");
intent.putExtra(Intent.EXTRA_EMAIL, emailAddressList);
intent.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
intent.putExtra(Intent.EXTRA_TEXT, "<b>Hi this is test app</b> <br/> your first app is this");
startActivity(Intent.createChooser(intent, "Choice App t send email:"));
,但它不与粗体并以新的一行示出
but it is not showing with bold and with new line
推荐答案
尝试下面code它的正常工作:)我已经测试
try out below code it's working fine :) i have tested
Intent shareIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:"+emailAddressList));
shareIntent.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
shareIntent.putExtra(
Intent.EXTRA_TEXT,
Html.fromHtml(new StringBuilder()
.append("<p><b>Hi this is test app</b></p>")
.append("<small><p>Hi this is test app</small>")
.toString()));
startActivity(Intent.createChooser(shareIntent, "Choice App t send email:"));
这篇关于在分享Android版Gmail撰写大胆的新行数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文