Layout files naming conventions?

I think following naming convention should be follow for activity if our activity name is DisplayListActivity then our layoutname should be display_list_activity. Xml for list items we can include category in list item layout name country_list_item. Xml and for dialogboxex there action can be included delete_country_dialog.xml.

Strangely enough, trying to google this question brings only this page as meaningful result... For the past half year I am using naming convention similar to yours but with shorter prefixes. For example: For activity that shows "About us" screen: Class name: ActAboutUs. Prefixing class is kind of overkill but it clearly distinguishes activity classes from the others.

Initially I used separate directory for all the activities (similar to your approach) but after some time I realized that for bigger apps may be it is better to group in directories by feature than by superclass (i.e. Activity). It is easier for me to work in single directory for example /src/settings/ when I work on Settings.

That way all java files that I need are in a single dir so I don't have to wander around: /src/settings/ActSettingsGlobal. Java /src/settings/ActSettingsNet. Java /src/settings/Settings.

Java /src/settings/SettingsDBAdapter. Java /src/settings/etc... This approach also helps to split the work among different developers, i.e. Each one is working in his own dir on separate feature so no stepping on each other's feet :-).

Some people preffer suffixes but I found them less useful. Prefixes help to group things alphabetically like in the example above: Act* prefix is sorted first so all activities are conveniently at the top. I am even considering of using Act_ as a prefix which is more readable although it is in conflict with java naming conventions... Layout filename: act_about_us.

Xml.In res/layout/ we don't have the "luxury" of subdirs which is quite unfortunate so the only way to group things is using appropriate prefix like act_, dlg_, etc... String IDs: It adds a lot of additional typing but it saves you from a lot of confusion later on. For global (application wide) strings we use prefix "global_", for example global_btn_ok, global_msg_no_inet_conn. Usually we make one person responsible for all global_ strings so if someone needs new string or change he needs to sync with him in order to avoid creating a mess.(now I am realizing that activity__element__item (two underscores) is more clear and readable than activity_element_item) All in all I still can't get rid of the feeling that there is something wrong with my approach because I can't believe that google devs created such an inconvenient framework when it comes to working with files, IDs, names, etc...

I was googling all over looking for some kind of guideline to follow myself which as you have discovered led me to post this question. – Salsero69 Jun 13 at 16:21.

For the past half year I am using naming convention similar to yours but with shorter prefixes. Class name: ActAboutUs. Prefixing class is kind of overkill but it clearly distinguishes activity classes from the others.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions