Android的整理布局到子文件夹 [英] Android Organise Layouts into Sub Folders

查看:203
本文介绍了Android的整理布局到子文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相当复杂的Andr​​oid应用程序,在布局文件夹中的内容变得越来越大。我一直在努力,个人的布局XML文件组织到子文件夹,例如:布局/按键/,布局/活动/,布局/视图/等,这似乎并没有工作,解析为R.类不是文件夹的内容。

I have a fairly complex android app, the contents of the 'layout' folder is becoming increasingly large. I've tried to organise the individual layout xml files into sub folders e.g. layout/buttons/, layout/activity/, layout/views/ etc. This doesn't seem to work, the content of the folders in not parsed into the R. class.

有没有办法做到这一点?

Is there a way to do this?

谢谢!

推荐答案

我不认为你将能够做到这一点。我相信,它仅支持像布局大型某个文件夹的名称, 布局MDPI,布局,华电国际,布局-FR,等等。你可以使用一个以上的这些修改,以及类似的布局-FR-HDPI-大。

I don't think you're going to be able to do this. I believe that it only supports certain folder names like layout-large, layout-mdpi, layout-hdpi, layout-fr, etc. You can use more than one of these modifies as well like layout-fr-hdpi-large.

本页面显示了所有允许的修饰符

This page shows all of the allowed modifiers

<一个href="http://developer.android.com/guide/topics/resources/providing-resources.html">http://developer.android.com/guide/topics/resources/providing-resources.html

这篇关于Android的整理布局到子文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆