简体   繁体   English

如何处理android多尺寸屏幕分辨率?

[英]How to deal with android multi size screen resolutions?

I made an app , and i am also using layout, layout_large,layout_x large folders for XML.我制作了一个应用程序,我也在使用 layout、layout_large、layout_x 大文件夹来处理 XML。 but when i test my app on 3.7 and 4.7 inch device...they both take XML from normal layout size folder and take layout-large XML for 7 inch tab.但是当我在 3.7 和 4.7 英寸设备上测试我的应用程序时……它们都从普通布局大小文件夹中获取 XML,并为 7 英寸选项卡获取布局大 XML。 so what should be done for layouts between 3.7 to 5.5 inches??那么对于 3.7 到 5.5 英寸之间的布局应该怎么做?? Help appreciated.帮助表示赞赏。

if your min sdk over 13 then try to work with layout-sw600dp... and not with layout-large ..如果您的最小 sdk 超过 13,则尝试使用 layout-sw600dp ... 而不是 layout-large ..

For example, if your multi-pane tablet layout requires at least 600dp of screen width, you should place it in layout-sw600dp/.例如,如果您的多窗格平板电脑布局需要至少 600dp 的屏幕宽度,则应将其放置在 layout-sw600dp/ 中。

Take a look :看一看 :

http://developer.android.com/guide/practices/screens_support.html http://developer.android.com/guide/practices/screens_support.html

In addition to layout folder try using density dependent layout.just as we use for drawables.除了布局文件夹,尝试使用密度相关的布局。就像我们用于 drawable 一样。 eg.hdpi,xhdpi,xxhdpi.例如.hdpi、xhdpi、xxhdpi。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM