以句点分隔的字符串资源名称是什么? [英] What is it dot-separated string resource name for?
问题描述
我正在使用snake_style来命名字符串资源.在某人的代码中,我发现了另一个带点的符号.我找不到有关此主题的单个单词.
I'am using a snake_style for the naming of string resources. In someones code i found another notation, with dots. I couldn't be able to found single word about this topic.
<resources>
<string name="title.activity.first">Activity 1</string>
<string name="title_activity_second">Activity 2</string>
</resources>
这些风格是否有实际的优点/缺点?还是仅仅是装饰性的东西?
Is there any practical advantage/disadvantage of theese styles? Or it is just a cosmetic thing?
推荐答案
这似乎只是表面上的事情,但是在android studio中它有破坏翻译检查的缺点,因此它显示没有翻译的警告. 就我而言,将点重命名为下划线并没有破坏任何内容,更新项目没有任何问题.
It seems to be just a cosmetic thing, but it has downside of breaking translation check in android studio, so it shows a warning of no translations. In my case renaming dots to underscores didn't break anything, updated project without any issue.
这篇关于以句点分隔的字符串资源名称是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!