How to display double quotes(
How to display double quotes(") Symbol in Android Text View
I'm trying to display some words in double quotes, in Text view in in xml file. But its not working. Pls help me.
Any one knows solution for this.............
Answer by louiscoquio for How to display double quotes(") Symbol in Android Text View
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"
Answer by Sunil Kumar Sahoo for How to display double quotes(") Symbol in Android Text View
use escape characters
. To display double quote use \"
Your code will be
android:text="message \"quote string 1\" and "quote string 2\" end message"
Answer by Nikhil for How to display double quotes(") Symbol in Android Text View
Please try
Answer by Jignesh Ansodariya for How to display double quotes(") Symbol in Android Text View
Answer by Roger Alien for How to display double quotes(") Symbol in Android Text View
Use "
symbol to solve this hardcode problem :)
android:text="message "quote string 1""
Answer by Nikhil Borad for How to display double quotes(") Symbol in Android Text View
TextView.setText(Html.fromHtml("? " + "YOUR TEXT" + " ?"));
Answer by Satheesh for How to display double quotes(") Symbol in Android Text View
If you have a double-quote in your string, you must escape it (\"). Surrounding the string with single-quotes does not work.
In String.xml
This is a \"good string\".
Source :http://developer.android.com/guide/topics/resources/string-resource.html
Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 71
0 comments:
Post a Comment