Pages

Wednesday, September 29, 2010

Android Trick : How to Include "&" and other special character in strings.xml

I am sure most of us must have faced problem in including "&" and other special character in strings.xml file.

Here are some of the example to do this. Just use right hand side values to achieve that

1. & = "&amp";


2. A space = \s


3. " = \"



4. New Line = \n

5. Tab Space = \t

Apart from this we can use HTML to format text in strings.xml