✅ string resource 관리 규칙
- 빈 줄로 각 화면 영역에서 쓰이는 것 구분해주기
- 각 화면 별 어떤 문장이고 어떤 VIEW인지 쓰기
- 스네이크로 작성
예시
- ui화면_직역_button
- ui화면_직역_description
<string name="login_screen_login_button">로그인</string>
<string name="login_screen_login_button_description">누르면 로그인 하는 버튼</string>
<string name="photo_screen_tree_image_view_title">내가 찍은 나무</string>
<string name="photo_screen_tree_image_view_description">내가 찍은 나무 사진</string>
❓ 왜 이렇게 1:1 대응으로 관리하는가?
- 동일한 string resource로 관리하는 것보다 각 component 별 string resource를 분리하여 관리하면 좋은 점
- UI 디자인 요구사항이 변경되었을 때 수정이 용이하다.
- XML을 찾지 않고 string 파일만 보고 요구사항을 수정을 반영할 수 있다. 👍
- 즉, 유지보수성과 편리성이 좋아진다.
✅ XML의 id 규칙
https://github.com/PRNDcompany/android-style-guide/blob/main/Resource.md
✅ Room DB 네이밍 규칙
- @Entity, @ColumnInfo를 모두 명시한다.
- tableName과 column name은 snake 형식으로 작성한다.