我的布局,被称为的main.xml
和我的设置方向为纵向我的的AndroidManifest.xml
。我设计了这个布局蜂窝太大,并放置在布局XLARGE-MDPI
文件夹,但我想用的main.xml
在布局XLARGE-MDPI
仅在横向方向。
I have layout that is called Main.XML
and I set the orientation to portrait in my AndroidManifest.xml
. I designed this layout for Honeycomb too and placed it in the layout-xlarge-mdpi
folder, but I want to use the Main.XML
in layout-xlarge-mdpi
only in landscape orientation.
现在,怎样才能做到这一点?
Now, how can do this?
感谢
您可以将您的的main.xml
在布局XLARGE陆
,那么它将只在横向
请参阅支持多画面(使用配置预选赛)
You can place your main.xml
in layout-xlarge-land
, then it will be used only in landscape orientation
Refer Supporting Multiple Screens (Using configuration qualifiers)
Android支持多种配置 预选赛,使您能够控制 系统如何选择你的 基于此替代资源 当前设备的特性 屏幕。一个配置预选赛是 字符串,可以附加到一个 在你的Android资源目录 项目和指定 配置的量,资源 内部设计。
Android supports several configuration qualifiers that allow you to control how the system selects your alternative resources based on the characteristics of the current device screen. A configuration qualifier is a string that you can append to a resource directory in your Android project and specifies the configuration for which the resources inside are designed.
编辑:
如果你提供了一个的main.xml
在布局
文件夹和另一个的main.xml
在布局XLARGE陆
,然后
If you provide an main.xml
in layout
folder and another main.xml
in layout-xlarge-land
, then
为超大横向
这将采取 main.xml中的布局XLARGE陆
为其他,那就是在横向或纵向
这将采取 main.xml中的布局
请参照提供了替代资源了解更多详细信息
Refer Providing Alternative Resources for more details