支持 - 屏幕清单文件 [英] Support-Screens in Manifest File
问题描述
这是我的code。在我的Android清单文件。
This is my code in my android manifest file.
supports-screens android:resizeable="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"
我从supportscreens明白的是,它可以用来简单地满足应用程序的屏幕上通过调整大小和伸展的形象做了多种屏幕尺寸。不过,我看不出有或没有这个code任何区别。谁能帮我?
What I understand from supportscreens is that it can be used to simply fit the app screen onto the multiple screen sizes done by resizing it and stretching the image. However, I don't see any difference with or without this code. Can anyone help me?
推荐答案
就像这样:
/res/layout/layout.xml // Default layout
/res/layout-small/layout.xml // Small screens
/res/layout-large/layout.xml // Large screens
/res/layout-xlarge/layout.xml // Ex
您可以再进一步,也使不同的布局为纵向和横向浏览用specyfing另一个关键字目录的名称:
You can go even further and make also different layouts for portrait and landscape views by specyfing another keyword in directory's name:
/res/layout-small-land/layout.xml // Small screens, landscape view
/res/layout-small-portrait/layout.xml // Small screens, portrait view
记住标签顺序很重要,所以你不能写布局画像小。
Remember that tags order is important, so you can't write layout-portrait-small.
而在最后添加本code到您的清单文件:
And in last add this code to your manifest file:
<supports-screens
android:resizeable="true"
android:smallScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:normalScreens="true"
android:anyDensity="true"/>
这篇关于支持 - 屏幕清单文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!