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

Luke Vo picture Luke Vo · May 25, 2011 · Viewed 10.6k times · Source

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?

Answer

Nanne picture Nanne · May 25, 2011

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

etc.