Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
XML の標準的な名前変換は、" " や " "myNameではなく " "のように見えますが、Android の XML ファイルでは " " 名前変換を使用します ( )my_namemy-namemy_nameandroid:title="@string/action_settings"
myName
my_name
my-name
android:title="@string/action_settings"
したがって、私はそれでダウンする必要があるのだろうか、それは Android が使用する標準の名前変換ですか?
使用できますcamelCaseがunderscore_style、物事の一貫性が高まります。
camelCase
underscore_style
の多くのリソース識別子はのRファイル名から派生し、ファイル名には大文字resのみを含める[a-z0-9._]ことができます。たとえば、大文字は使用できません。R.id識別子は、ファイル名から派生したものではないため、特別です。それでも、ファイルベースのリソース識別子と同じ命名規則に従うことは理にかなっています。
R
res
[a-z0-9._]
R.id