Can sub-folders be added to the drawable directory of android projects?

1

In an android project, if I have a large number of images within the drawables directory, can I organize them in sub-folders?

Example of a directory structure:

drawable/*.png
drawable/deporte/*.png
drawable/finanzas/*.png
    
asked by Pablo Ezequiel 31.07.2016 в 06:30
source

2 answers

1

Currently with Android Studio you can create subfolders but the compiler does not take them into account and excludes them, in fact they are not included in the file R.java .

What is done is to add suffixes or prefixes in the names of resources, for example:

drawable/miimagen_deporte.png
drawable/miimagen_finanzas.png
    
answered by 31.07.2016 / 08:56
source
1

For organizational purposes if you can place them in subdirectories, I understand, because when you have a considerable amount of drawables, just opening the folder in Android Studio is scary! but at the moment the code does not detect the subdirectories, you should use suffixes.

    
answered by 02.11.2016 в 23:44