yes, I looked it up!
<!-- comment -->
seems to be the right choice, but I get an error in android-studio Gradle: Error parsing XML: not well-formed (invalid token)
when I do this
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<!-- android:background="?android:attr/selectableItemBackground" -->
android:id="@+id/imageButton"
android:layout_alignParentTop="true"
android:src="@drawable/gfx_select_medium"
android:layout_marginRight="22dp"/>
any help is appreciated, thx!
XML comments cannot be placed inside tag markup. Move the comment for example above or below your ImageButton
tag.
Here's the spec reference, with emphasis added:
Comments may appear anywhere in a document outside other markup
Where markup is defined as:
Markup takes the form of start-tags, end-tags, empty-element tags, entity references, character references, comments, CDATA section delimiters, document type declarations, processing instructions, XML declarations, text declarations, and any white space that is at the top level of the document entity (that is, outside the document element and not inside any other markup)
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