Android的布局文件夹组织文件夹、布局、组织、Android

2023-09-04 08:48:33 作者:오른쪽 ȏ

我开发一个Android应用程序,我现在已经在布局文件夹约8布局的XML文件。需要组织该文件夹在增加每增加一个布局资源文件。然而,当我创建一个文件夹的布局文件夹内,并通过重构操作移动资源给它,它打破我的项目。

I am developing an Android app and I currently have about 8 layout xml files in the layout folder. The need for organizing this folder is increasing with each additional layout resource file. However, when I create a folder inside of the layout folder and move a resource to it via the refactor operation, it breaks my project.

例如,我的资源正在这里refernced:

For example, my resource is being refernced here:

setContentView(R.layout.login);

移动后的 login.xml 文件名为新建文件夹测试,它打破我的身材。

After moving the login.xml file to a newly created folder called "test", it breaks my build.

如果我更新引用:

setContentView(R.layout.test.login);

它仍然不能编译。

It still doesn't compile.

任何帮助将是很大的AP preciated。

Any help would be greatly appreciated.

推荐答案

目前不支持的资源子文件夹。我想大家谁读这应该提上了issue.

Sub folders in resources is not currently supported. I think everyone who read this should put a star on the issue.