Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I'm using the @ sign in a project and want to set its text value to a string resource. However android studio complains if i do this. <string name="atsign">@</string>. What is the best way to set the @ sign as a string attribute?
<string name="atsign">@</string>
<string name="atsign">\@</string>
Use this below code in your string.xml file
<string name="at_str">\u0040</string> Output
Add a comment
use this as your string value
\@
Required, but never shown
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.
Explore related questions
See similar questions with these tags.
<string name="atsign">\@</string><string name="atsign">@</string>works fine although AS is complaining