Answer the question
In order to leave comments, you need to log in
How to maintain order in the resources of an Android project?
After a certain threshold, I began to notice that it became inconvenient to maintain flat resource structures in order. One and a half hundred layouts, heaps of lines and graphic resources, and all this in one folder without the possibility of sorting it hierarchically according to the components. If it were not for fast navigation in AS, it would be quite sad.
So I would like to ask the community. How does one structure the resources used? Are there any practices for simulating packets?
1. activity_componet_subcomponent.xml (what I'm using now)
2. splitting the project into isolated submodules?
3. ... ?
Answer the question
In order to leave comments, you need to log in
For layouts I use activity_*, fragment_*, dialog_*, item_* etc. prefixes. The main thing is to determine all prefixes in advance and strictly adhere to them.
With images, it is more difficult, since it is not always possible to determine the prefixes.
For other resources (strings, colors, styles), you can create multiple files. For example string_dialogs.xml, string_preferences.xml etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question