I'm looking for a way to escape the "@" symbol at the start of a string, in Android strings.xml resource. I'm continuously getting compilation errors and the layout builder in Eclipse refuses to work :(. Does anyone know how?
If I put <string name="twitter">\@mytwitter</string>, I still have a compilation error. Do you have another workaround?
patgrdj
2010-10-31 13:59:32
I assume you have, but just in case: have you tried "/"?
raybritton
2010-10-31 14:06:39
I just tried your string in my strings.xml , it works , whats the exact error you are getting?
Ravi Vyas
2010-10-31 14:34:54
No more compilation errors. However, it displays the backslash character. I got something working with <string name="twitter">\ @mytwitter</string> (a space between "\" and "@"). Thanks for your help!
patgrdj
2010-10-31 17:13:14