How to put TODO comments in xml?

Markonionini picture Markonionini · Sep 14, 2014 · Viewed 10.7k times · Source

I was wondering if there is a way to comment parts of xml code in android so they would later show up in TODO list in android studio? I am using android studio 0.8.2.

Answer

laalto picture laalto · Sep 14, 2014

You can use XML comments <!-- ... --> with TODO tags, e.g.

<!-- TODO remember the milk -->

Note that XML comments need to be at the tag level, that is

<!-- TODO ... -->
<SomeElement .../>

and not inside the tag like

<SomeElement <!-- TODO this won't work --> />