简体   繁体   中英

Multiple XHDPI Device Resolution

I need to handle multiple XHDPI devices resolution. As far as i came to know, there are following Dimensions that are falling in XHDPI Range :

  • 1184x768
  • 1280x720
  • 1280x800
  • 1224x720

as they all belong to same Dimension, how to differentiate the Resources (drawables) it should load according to screen dimension?

or

If I use a single XHDPI layout and place their drawable in xhdpi folder is it sufficient or will this thing disturb the UI

Thank you

XHDPI is a single bucket

Short Answer:

A single layout for XHDPI will suffice with their resources placed in the proper (xhdpi) drawables folder.

Long Answer:

Android Devices vary so much, so android decides that these set of screen resolutions fall under one bucket ie treated as one device since the variation among themselves is relatively lesser compared to the whole range. Android does runtime image manipulation to adjust your resources a little so that they function as expected.

Bonus:

To have finer control on images, look at the Scale attribute.

you can read more here

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

basically if you want...you can create folders with the following names:

  • layout-sw520dp-port //Galaxy Note at v4.0.3
    layout-sw520dp-land layout-sw600dp-port // Nexus 7
    layout-sw600dp-land layout-sw700dp-port
    layout-sw700dp-land

etc. etc

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