How to place "&" in xml strings file in android studio

13,421

Write:

<string name="text1">ben &amp; angie</string>

Here is a link to the xml spec how to escape characters.

Share:
13,421

Related videos on Youtube

Hucen Farhan
Author by

Hucen Farhan

Updated on June 12, 2022

Comments

  • Hucen Farhan
    Hucen Farhan almost 2 years

    I have my xml string file like this:

    <string name="text1">ben & angie</string>
    

    But it says I have an unescaped & . How to escape it?