【发布时间】:2011-05-31 11:32:11
【问题描述】:
我做了两个文件夹,res/layout 和 res/layout-land
我得到的输出
如果我以portrait 模式启动应用程序,如果应用程序以portrait 模式运行,它将始终使用layout 文件夹中的xml。如果我将设备更改为landscape 模式,则不会在layout-land 中使用xml
如果它以landscape 模式启动,则仅使用layout-land 中的xml
方向更改时xml 不切换
我的期望是
它应该在纵向模式下使用 layout 文件夹中的 xml,在横向模式下使用 layout-land 中的 xml
在 Manifest 文件中,我为活动添加了android:configChanges="orientation" 和
<supports-screens
android:resizeable="true"
android:largeScreens="true"
android:normalScreens="true"
android:anyDensity="true" />
我在这里错过了什么吗?我需要在这里做哪些改变?
谢谢你
【问题讨论】:
标签: android configuration android-layout