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.............
to show double quote you can simple use escape character("\") to show it.
The keyboard shortcut for the double quotation mark symbol is shift + first key on the left side of ENTER. For windows, the double quotation mark sign alt code is 34.
Let's say you're trying to use quotation marks inside a string. You'll need to use opposite quotation marks inside and outside of JavaScript single or double quotes. That means strings containing single quotes need to use double quotes and strings containing double quotes need to use single quotes.
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"
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"
For more, visit http://developer.android.com/guide/topics/resources/string-resource.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With