如何显示双引号(")符号在Android的文本视图 [英] How to display double quotes(") Symbol in Android Text View
本文介绍了如何显示双引号(")符号在Android的文本视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想显示在双引号中的一些话,在文本查看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"
这篇关于如何显示双引号(&QUOT;)符号在Android的文本视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文