I am displaying Activity's Title
from strings.xml
file like this
setTitle(R.string.add_contact_title);
I have following string
in strings.xml
<string name="add_contact_title">Anadir Contacto</string>
but i want to display title like Añadir Contacto
instead of Anadir Contacto
.
is there any way to do this within the strings.xml file rather than copying and pasting the characters from another source?
You can also use unicode using the \\u\u003c/strong> escape sequence like this:
<string name="add_contact_title">A\u00F1adir Contacto</string>
See here for a list of common unicode latin characters: http://unicode-table.com/en/#latin-extended-b
You can use ñ
You can find all the HTML Special Characters in this page
Special Characters in Android & HTML
just replace the code where you want to put that character. :-)
Yes you can do that. You have to start the special character with &
ie for your case it will be like ñ
<string name="add_contact_title">A
ñ adir Contacto</string>
Just check the link which will convert ASCII into Unicode ASCII to Unicode and Unicode Reference
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.