[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

layouts

Step 1: Right click on the folder res selected new/Directory then naming the folder layouts

create layouts

Step 2: Right click on the folder you just created layouts, selected new/Folder/Res Folder.

create home

Name the folder and reasonable path (within layouts).

create home 1

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'
        ]
    }
}