android / android/architecture-samples
[all] create name convention for layout IDs
- Dominant language
- Kotlin
- Stars
- 45.8k
- Forks
- 11.9k
- PR merge metrics
- No merged PRs in 30d
Description
There is no convention for layout view ids!
In your sample code are somerimes camelCase, sometimes snake_case underscope ids. It make a mess. So please use only one and everywhere same name convention.
For me is prefered camelCase (due to kotlinx) with some prefix like `v` (view).
What is Google's prefered code style and why developers in Google don't use same style? :/
https://github.com/googlesamples/android-architecture/blob/todo-mvp-dagger/todoapp/app/src/main/res/layout/addtask_act.xml#L45
` android:id="@+id/coordinatorLayout"`
https://github.com/googlesamples/android-architecture/blob/todo-mvp-dagger/todoapp/app/src/main/res/layout/addtask_frag.xml#L31
`android:id="@+id/add_task_title"`
Contributor guide
Research direction
Start by comparing the IDs in todoapp/app/src/main/res/layout/addtask_act.xml and addtask_frag.xml, then inspect the other sample layout resources for mixed conventions. Decide on one naming convention, update affected layout IDs and their references consistently, and verify that the Android samples still build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100