相关疑难解决方法(0)

如何在Android中的字符串中插入新行

这可能看起来像一个愚蠢的问题,但我一直在寻找,无法找到答案.

我正在创建一个Android应用程序,其中有一个按钮,它将在电子邮件中发送一些信息,我不希望所有内容都在一个段落中.

这是我的应用程序为电子邮件正文的putExtra所做的事情:

I am the first part of the info being emailed. I am the second part. I am the third part.
Run Code Online (Sandbox Code Playgroud)

这就是我想要它做的事情:

I am the first part of the info being emailed.
I am the second part.

I am the third part.
Run Code Online (Sandbox Code Playgroud)

如何将新行放入字符串或使用putExtra方法来实现?

谢谢.

string android enter

55
推荐指数
4
解决办法
12万
查看次数

标签 统计

android ×1

enter ×1

string ×1