Can the Android layout folder contain subfolders?

前端 未结 20 2615
暗喜
暗喜 2020-11-22 03:10

Right now, I\'m storing every XML layout file inside the \'res/layout\' folder, so it is feasible and simple to manage small projects, but when there is a case of large and

20条回答
  •  长情又很酷
    2020-11-22 04:11

    Now with Android Studio and Gradle, you can have multiple resource folders in your project. Allowing to organize not only your layout files but any kind of resources.

    It's not exactly a sub-folder, but may separte parts of your application.

    The configuration is like this:

    sourceSets {
        main {
            res.srcDirs = ['src/main/res', 'src/main/res2']
        }
    }
    

    Check the documentation.

提交回复
热议问题