androidxmlsymbolsxml-layout

Use special symbol (<, >) in layout design in Android


I need two navigation buttons with their texts are < and >. However, the compiler doesn't allow me use those symbols, even if I use \< and \>.

Is there anyway to put these symbol into the XML design file?


Solution

  • Use &lt; for <
    Use &gt; for >
    Use &amp; for &.

    etc.