Is it possible to create subfolders under res/layout and place the layout XML files there so that one can call a view like setContentView(R.layout.questions.create);
or setContentView(R.layout.questions/create);
?
First, Android supports only a linear list of files within the predefined folders under res. For example, it does not support nested folders under the layout folder (or the other folders under res). Second, there are some similarities between the assets folder and the raw folder under res.
To create a subfolder, tap the menu button > Create subfolder: Once you create a subfolder, you can start adding files to it.
Normally we store every xml layout file inside the res/layout folder. It is feasible and simple to manage small projects. But in a large and heavy project, it is very common that the resources folder grows and grows and if your project have more then 35 layouts it's a problem to find a required layout.
From my tests, no.
You might want to consider a naming convention:
Or, investigate Android library projects: http://androidblogger.blogspot.com/2010/09/android-library-projects.html - seems pretty good to add more structure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With