V
V
Vladimir Abramov2014-08-01 17:57:02
Android
Vladimir Abramov, 2014-08-01 17:57:02

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

2 answer(s)
M
Marina, 2014-08-04
@MJee

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.

S
samarjan, 2014-08-01
@samarjan

Since it is written in paragraph 1, this is how it is done, that is, a prefix is ​​\u200b\u200bwritten for a specific component, there is no other way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question