<!-- Comment -->
is the way to add comments in an XML file. Doesn't that actually means, that this part is not "compiled"?
However, when I do something like this:
<item android:id="@+id/ss3"
android:icon="@drawable/some_icon"
android:title="Blabla Title"
tools:ignore="AppCompatResource"
<!-- -->
/>
I get an error "Tag start is not closed". Why?
All XML Elements Must Have a Closing Tag This is not an error.
The end tag functions exactly like a right parenthesis or a closing quotation mark or a right curly brace. It contains no data of its own; it simply ends the most recent (innermost) tag with the same name. XML requires a matching end tag for each start tag.
XML data is a serial stream. The start tag informs the receiving software that all the incoming data will belong to this element until the matching end tag is encountered. Very often, more start tags are encountered before the end tag.
Comments are not allowed inside tags. You have to close the tag first with ">" or "/>" and then you can add your comment there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With