Android 屏幕支持不同的屏幕大小
在我的应用程序中,我的布局如下所示Android 屏幕支持不同的屏幕大小,android,android-layout,Android,Android Layout,在我的应用程序中,我的布局如下所示 layout/example.xml layout-land/example.xml layout-small/example.xml layout-small-land/example.xml layout-large/example.xml layout-large-land/example.xml layout-xlarge/example.xml layout-xlarge-land/example.xml 我用HTC sensation和LG
layout/example.xml
layout-land/example.xml
layout-small/example.xml
layout-small-land/example.xml
layout-large/example.xml
layout-large-land/example.xml
layout-xlarge/example.xml
layout-xlarge-land/example.xml
我用HTC sensation和LG optimus Net P699(320x480)测试了我的应用程序。对于HTC sensation,它采用了
布局大型/example.xml
布局大型土地/example.xml
但对于P699,它从layout/example.xml
获取横向和纵向模式的布局。为什么会这样???对于景观,它必须从布局区域/example.xml
右侧???根据设备的适用性选择布局,即使您指定了布局的大小或密度
由于android布局的范围有重叠的边界,所以在许多情况下,它往往会混淆它们。
只需为纵向模式布局添加另一个文件夹,并对其进一步分类即可
删除
layout/example.xml
并使其成为layout-port/example.xml
,这样它就不支持您的屏幕是的..对于LG P699,布局是从layout/example.xml中选取的。您是否尝试过普通屏幕