在不同的设备Android布局文件夹
问题描述:
我已经开发了针对Android应用程序,我需要在不同的设备上运行我的应用程序 - 与1280×720 480×800和决议,特别是在设备上
I have developed an app for Android and I need to run my app on different devices - especially on devices with 1280x720 and 480x800 resolutions.
哪个文件夹的布局做我必须创建?
Which layout folders do I have to create?
先谢谢了。
答
布局文件夹这样的方式。
Layout folder like this way.
res/layout/my_layout.xml // layout for normal screen size ("default")
res/layout-small/my_layout.xml // layout for small screen size
res/layout-large/my_layout.xml // layout for large screen size
res/layout-xlarge/my_layout.xml // layout for extra large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation
在清单中添加支持的屏幕
In Manifest add support-screens
<supports-screens android:resizeable=["true"| "false"]
android:smallScreens=["true" | "false"]
android:normalScreens=["true" | "false"]
android:largeScreens=["true" | "false"]
android:xlargeScreens=["true" | "false"]
android:anyDensity=["true" | "false"]
android:requiresSmallestWidthDp="integer"
android:compatibleWidthLimitDp="integer"
android:largestWidthLimitDp="integer"/>
有关详细信息检查此 http://www.kandroid.org/guide/practices /screens_support.html 和 http://developer.android.com/guide/做法/ screens_support.html
For more info check this http://www.kandroid.org/guide/practices/screens_support.html and http://developer.android.com/guide/practices/screens_support.html