[Android] Split folder layout
Are your layout folder was too big and hard to control, difficult search? Now with Android Studio you can split it up so easily managed as shown below
Step 1: Right click on the folder res selected new/Directory then naming the folder layouts
Step 2: Right click on the folder you just created layouts, selected new/Folder/Res Folder.
Name the folder and reasonable path (within layouts).
Wait awhile file gradle update again. After the update you will see 1 folder home is yellow like the color of the folder res but not in layouts. In fact it is located in layouts but only due to current layouts 1 folder is the home so it does not show. You continue to create another folder name note like home will see 2 folder within layouts.
Now you create the folder layout (no 's') located in the home and notes and use normal.
You can also create a menu, drawable in home, such as layout note.
If you notice, gradle file will add a paragraph like this:
sourceSets { main { res.srcDirs = ['src/main/res', 'src/main/res/layouts/home', 'src/main/res/layouts/note' ] } }
Waiter, when you follow your hd, that finished in layout but if you can use his string resouce like his writing and the newly created variable in values / string.xml by type Alt + Space, it was forced to chooose directory error (directory will be normal values / string). If you select the directory, then the string values that are not in folders values / string as normal but it created 1 folder in the folder layout values (as he presents).
What this case I also never tried, tring wrote in his entire file before using.
But if it manually create files in a layout that values which also đk.