- In AOSP ids normally use underscores.
address_idinstead ofaddressId. I have seen attributes use camelCase in AOSP however. - That is the best practice. This is from the Code Style Guidelines for Contributors for AOSP:
Follow Field Naming Conventions
Non-public, non-static field names start with m. Static field names start with s. Other fields start with a lower case letter. Public static final fields (constants) are ALL_CAPS_WITH_UNDERSCORES.
- Layout files/XMLs are lowercase and use underscores. Your usage is correct.
- Class names should follow the naming conventions outlined by Oracle.
Class names should be nouns, in mixed case with the first letter of each internal word capitalized. Try to keep your class names simple and descriptive. Use whole words-avoid acronyms and abbreviations (unless the abbreviation is much more widely used than the long form, such as URL or HTML).