android studio to create hierarchical folders in the layout, the layout have a hierarchy

    Android as a beginner, I like to write a little something. Inadequate or wrong with the hope that we criticism, thank you

   

     Write a more interfaces app will create a lot of layout file, and sometimes will confuse yourself, so check the internet the following information, in fact, there are many correct blog in this just for the next record.

     First, we need to create in the selected project

    Then, find the layout position,

   

    After that, right, new> Directory, write the name you want to create, I usually go by function modules.

    Finally, the need in build.gradle (app) is added android {}

  

sourceSets {
    main {
        res.srcDirs =
                [
                        'src/main/res/layout/memory_layout',
                        'src/main/res/layout/module_layout',
                        'src/main/res/layout/common_layout',
                        'src/main/res/layout',
                        'src/main/res'
                ]
    }
}

The above information is created - note the time to create a layout also under project ~

 

 

 

    

Guess you like

Origin blog.csdn.net/liuhongbin2011net/article/details/82687392