编辑字符串在XML中,我需要添加换行符的时候。我想问问编程为Android时,什么是正确的形式?因为< BR>
的作品,但ECLIPSE标志着该地区的问题。如果我退房建议Eclipse的告诉我,我将添加一个结束标记< / BR>
- 如果我补充一点,换行符自败...
when editing a String in XML I need to add line breaks. And I wanted to ask what is the RIGHT form when programming for android? Because <br>
works but ECLIPSE marks the area as problematic. If I check out suggestions Eclipse tells me that I shall add a end tag </br>
- IF I add that the line break dissapears...
所以,一部作品,但被标记为有问题的,其他作品不但是Eclipse告诉我它确定..
So the one works but is marked as problematic, the other works not but Eclipse tells me its ok..
我会用什么样的形式?
使用 \ñ
作为换行符和 \ t
如果要插入一个标签。
Use \n
for a line break and \t
if you want to insert a tab.
您也可以使用一些XML标签的基本格式:&LT; B&GT;
粗体文字,&LT; I&GT;
表示斜体,和&LT; U&GT;
为带下划线的文本
You can also use some XML tags for basic formatting: <b>
for bold text, <i>
for italics, and <u>
for underlined text.
其他格式化选项显示这篇文章在Android开发者网站: http://developer.android.com/intl/de/guide/topics/resources/string-resource.html
Other formatting options are shown in this article on the Android Developers' site: http://developer.android.com/intl/de/guide/topics/resources/string-resource.html