How to write character & in android strings.xml
For special character I normally use the Unicode definition, for the '&' for example: \u0026 if I am correct. Here is a nice reference page: http://jrgraphix.net/research/unicode_blocks.php?block=0
Even your question is answered, still i want tell more entities same like this.
These are html entities
, so in android you will write them like:
Replace below with:
& with &
> with >
< with <
" with ", “ or ”
' with ', ‘ or ’
} with }
This is a my issues, my solution is as following: Use >
for >
, <
for <
, &
for &
,"'"
for '
, "
for \"\"
Encode it:
&