在Android的布局XML注释 [英] Comments in Android Layout xml

查看:101
本文介绍了在Android的布局XML注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会在一些评论到布局XML文件进入,会怎么做呢?

I would to enter in some comments into the layout XML files, how would I do that?

推荐答案

由于对方表示,在XML中的注释是这样的

As other said, the comment in XML are like this

<!-- this is a comment -->

请注意,他们可以在多行跨越

Notice that they can span on multiple lines

<!--
    This is a comment
    on multiple lines
-->

但他们不能嵌套

But they cannot be nested

<!-- This <!-- is a comment --> This is not -->

你也可以不使用它们里面的标签

Also you cannot use them inside tags

<EditText <!--This is not valid--> android:layout_width="fill_parent" />

这篇关于在Android的布局XML注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆