我想显示在双引号中的一些话,在文本查看XML文件中。但它不工作。请帮助我。
I'm trying to display some words in double quotes, in Text view in in xml file. But its not working. Pls help me.
<TextView
style="@style/TextStyle"
android:text="message "quote string 1" and "quote string 2" end message"
android:id="@+id/lblAboutPara3"
android:autoLink="web"/>
任何人知道解决方案,这个.............
Any one knows solution for this.............
在的strings.xml
,你可以简单地转义特殊字符(如双引号)用一个反斜杠
In the strings.xml
, you can simply escape special characters (eg double quotes) with a backslash :
"message \"quote string 1\" and \"quote string 2\" end message"
但在看法XML(如 layout.xml
),您必须使用HTML字符实体(如&放大器; QUOT;
):
But in views xml (eg layout.xml
), you have to use HTML character entities (like "
) :
"message "quote string 1" and "quote string 2" end message"