When the development of a large number of application modules, resource files will be particularly large, layout will be more up, when all the layout is placed in the same directory, it will appear bloated, and not good to find the corresponding layout.
Recently saw the data, found in Android Studio can be configured multiple res directory, used to split different modules.
As shown, you can create a variety of resource directories in the Res directory of a new module:
Of course, you can also create directories such as Drawable,values in the RES-QA directory
These resource files can be referenced as directly as the original R file.
The above is only an effect and needs to be configured in Build.gradle
Android { ... sourcesets { + = ' Src/main/res-qa ' + = ' src/main/res-wb ' }}
or the following form
Android { ... sourcesets {// main.res.srcDirs + = ' Src/main/res-qa '// Main.res.srcDirs + = ' src/main/res-wb ' + = [' Src/main/res-qa ', ' SRC/MAIN/RES-WB ' }}
Reference Link: http://antonioleiva.com/android-multiple-resource-folders/
Modularity of resource files via Gradle configuration under Android Studio