Subfolders under layout in Android Development
If there are many interfaces in a project, there will be too many activity * * *. XML files under layout. At this time, you need to use folders to store these files separately.
Of course, you can directly create a new folder here. Although you can create it, it can not be used directly, and the IDE will report an error.
The best way is to plan the number of modules in the project at the beginning of the project.
Then add the following code in Android {} of APP / build.gradle file. After clicking sync now, the IDE will be updated and loaded once. Maybe you need to restart the IDE.
After restarting Android studio, you can create a new package under Src / main / Java. Here, I create com.cofox.functions
New package functions
Create a new empty activity under functions
New activity
Name it menufunctionsactivity
Name it menufunctionsactivity
You will find that there are more folders under layout
Folder for new module
Yes, this has realized the sub folder management of the interface.
The important idea is to manage the construction project in modules from package.
summary
The above is the subfolder under layout in Android development introduced by Xiaobian. I hope it will help you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!