简体   繁体   中英

How it looks like : XHDPI PSD on Nexus 4 Screen?

Dear Android Developers,

as far as I know, Android has 4 different types of screen resolution :

  • LDPI << ignore this, because I won't build my app in this resolution
  • MDPI : 320 x 480
  • HDPI : 480 x 720
  • XHDPI : 640 x 960

now, Google Nexus 4 has screen resolution : 768 x 1280, which I assume this categorised as XHDPI model. *please correct me if I'm wrong.

now take a look at my picture...

在此处输入图片说明

so, if I put XHDPI size (red area) on top of Nexus 4 screen (grey area) you'll see what I see.

now, if I have 4 white boxes horizontally and 6 white boxes vertically on red area (PSD design). what it looks like on Nexus 4 screen resolution?

can we programatically add more boxes (blue boxes) to fill the empty space? or Android will automatically stretch that red area until covers all grey area? which means all of white boxes will be stretched too...

that's all I need to know... thanks.

You should watch Roman Nurik's Design Bytes: Density-Independent Pixels video.

First, stop thinking in pixels. Think of devices using density-independent pixels. The buckets that Android uses (ldpi, mdpi, etc.) are not measured in pixels; they are measured in dots-per-inch (DPI).

Those buckets are actually:

  • LDPI: 120 DPI
  • MDPI: 160 DPI
  • HDPI: 240 DPI
  • XHDPI: 320 DPI

The Nexus 4 has a DPI of precisely 320.

Screen size and Screen DPI are different things. Check https://developer.android.com/guide/practices/screens_support.html

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