Right now, I\'m storing every XML layout file inside the \'res/layout\' folder, so it is feasible and simple to manage small projects, but when there is a case of large and
A way i did it was to create a separate res folder at the same level as the actual res folder in your project, then you can use this in your apps build.gradle
android {
//other stuff
sourceSets {
main.res.srcDirs = ['src/main/res', file('src/main/layouts').listFiles()]
}
}
then each subfolder of your new res folder can be something relating to each particular screen or something in your app, and each folder will have their own layout
/ drawable
/ values
etc keeping things organised and you dont have to update the gradle file manually like some of these other answers require (Just sync your gradle each time you add a new resource folder so it knows about it, and make sure to add the relevant subfolders before adding your xml files).