Reputation: 5525
Dear Android Developers,
as far as I know, Android has 4 different types of screen resolution :
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.
Upvotes: 2
Views: 3577
Reputation: 67249
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:
The Nexus 4 has a DPI of precisely 320.
Upvotes: 6
Reputation: 7466
Screen size and Screen DPI are different things. Check https://developer.android.com/guide/practices/screens_support.html
Upvotes: 1