简体   繁体   中英

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. 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. so what should be done for layouts between 3.7 to 5.5 inches?? Help appreciated.

if your min sdk over 13 then try to work with layout-sw600dp... and not with layout-large ..

For example, if your multi-pane tablet layout requires at least 600dp of screen width, you should place it in layout-sw600dp/.

Take a look :

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. eg.hdpi,xhdpi,xxhdpi.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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