简体   繁体   English

Android:段落中的文本格式

[英]Android: Text formatting in paragraphs

I have text which is in xml and its a long text divided into several paragraphs. 我有xml格式的文本,它的长文本分为几段。 How shall I store this text in db and then retrieve it so that I get the text in the paragraphs form? 如何将这些文本存储在db中,然后进行检索,以便以段落形式获取文本?

"Heading\n\n\tThis is the first paragraph and you can see the second paragraph below.\n\n\tThis is the second"

Store like this. 这样存储。 Use \\n\\n\\t before starting each paragraph. 在开始每个段落之前,请使用\\ n \\ n \\ t。 \\n is for new line and \\t for tab. \\ n用于换行,\\ t用于制表符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM