I am trying to make @sancorporation in my android application. I have written strings in string.xml eg "<"string name="cor_name">sancorporation"<"/string>, but I need something like this "<"string name="cor_name">@sancorporation"<"/string>. How to take special symbol in android?
Use ascii value of @ symble is 0040 so try it
for @sancorporation
<string name="mytest">@sancorporation</string>
or
<string name="mytest">\u0040 sancorporation</string>
Maybe this will help
<string name="specialChar"> "@" </string>
You can also try this
<string name="specialChar"> \@ </string>
Edit: Now I notice that you want to write @sanCorporation.
so you can use this in string.xml file:
<string name="corp"> "@sanCorp" </string>
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.