You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
peter-tackage
changed the title
Revisit string, color and dimensions resource naming convention advice
Revisit id, string, color and dimensions resource naming convention advice
Jul 16, 2017
I generally use this approach and find it easier to understand and recognize all the id's. https://jeroenmols.com/img/blog/resourcenaming/resourcenaming_cheatsheet.pdf. It uses 4 things to name a resource id: WHAT, WHERE, DESCRIPTION, SIZE.
WHAT - what type of id is this. For eg- For TextView, it should be: tv. For activity layout, it should be :activity.
WHERE- where it is being used. For eg in main activity, it should be: activity_main.
DESCRIPTION- a small description of id. For eg - For username, it should be: et_main_username.
SIZE(Optional)- the size of the resource. For eg - 24 dp.
Therefore, a complete id name can be: activity_main, btn_signup_submit, error_main_username_not_provided, ic_add_24dp.
The text was updated successfully, but these errors were encountered: