1

I want to hard code a string resource with an email syntax like ABC@gmail.com. But, eclipse pop up an error to say that "@" cannot be included.

How can '@' include in the string resource.

Thanks you.

King Wu
  • 387
  • 1
  • 8
  • 22

1 Answers1

1

Try this:

Add string in strings.xml:

<string name="email">xyz@gmail.com</string>

and try to set this in activity as:

textView.setText(R.string.email);
AkashG
  • 7,868
  • 3
  • 28
  • 43