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.
Asked
Active
Viewed 1.3k times
2 Answers
43
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 --> />

laalto
- 150,114
- 66
- 286
- 303
-
1this is not showing blue sign in xml files as showed in java files – Rishabh Agrawal Dec 18 '15 at 19:40
3
XML TODO comments are now visible afterwards Android Studio 3
in TODO list. To use them you can use it like below:
<!-- TODO Pending task -->
<android.support.v7.widget.CardView
Make sure to use it above Element/View in XML and not in-between.

Rahul Khurana
- 8,577
- 7
- 33
- 60