dimen.xml 还是 dimens.xml?
我通常将尺寸存储在 dimen.xml
文件中。但是,IntelliJ IDEA 的智能感知将尺寸放入文件 dimens.xml
中。
现在,如果我将尺寸放入文件 dimens.xml
中,Eclipse 将如何处理这个问题?
我看到文档允许使用这两个文件。如果项目将由 Eclipse 和 IDEA 用户同时使用,那么应该使用哪一个?
I usually store dimensions in dimen.xml
file. However, IntelliJ IDEA's intellisense places dimensions into file dimens.xml
.
Now, what if I place dimensions into the file dimens.xml
, how will Eclipse handle this?
I see that docs allow both files to be used. Which one should be used if the project will be used by both Eclipse and IDEA users?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
文件本身的名称并不重要,但有一些建议。来自文档(关于res/values):
编辑:为了清楚起见,重要的是您在文件的
标记内使用适当的元素(在本例中为
)。这就是 android 知道它是维度资源的方式。It doesn't really matter what you name the file itself, however there are recommendations. From the docs (on res/values):
Edit: For clarity, the important part is that you use the appropriate element (
<dimen>
in this case) inside a<resource>
tag in your file. This is how android knows it's a dimension resource.