1

I am trying to make @sancorporation in my android application. I have written strings in string.xml e.g "<"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?

2 Answers 2

2

Use ascii value of @ symble is 0040 so try it

for @sancorporation

          <string name="mytest">&#64;sancorporation</string>

           or 
           <string name="mytest">\u0040 sancorporation</string>
Sign up to request clarification or add additional context in comments.

1 Comment

\u00A9 is ANSII value of @ symble so you can use it directly.
0

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>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.