2

Apologies in advance for this complete noob question.

I noticed that the Material Design website publishes device metrics at https://material.io/devices/ and includes screen dimensions in dp (density-independent-pixels). Google's definition of dp's is as follows:

"A dp is equal to one physical pixel on a screen with a density of 160."

I assume the density they're talking about is the pixels-per-inch (or ppi) density.

Using the above information, one would think that a device like the iPad, which has a screen size of 768x1024 in pixels, and a ppi of 132, would have a dp size of 931x1241 dp. But the Material Design device metrics page still lists the iPad's dp size as 768x1024 dp (same as in pixels), which would imply that 1 pixel on the iPad is equal to 1 dp. Which couldn't be the case because it's not a 160 ppi screen, right? Or what am I completely missing?

Thank you.

3 Answers 3

2

You're absolutely right. However, it seems that this is done on purpose — Google itself lists the physical density for the device as 132 dp/in and calculates a different dp touch size range than for those with different screen densities.

I'm guessing that the reason for this is that it's easier to work with a limited number of device density multipliers, and multiples of 0.5 are especially easy to work with. It makes life much easier for designers of icons and other graphical elements, who have to make sure everything lines up perfectly to a pixel grid on all devices so that all graphics look crisp. (The exception here is watches, where Google allows a 1.3x density multiplier.)

A multiplier of 1.2 would require designing special graphics for, which, given that the iPad and iPad 2 are more than 6 years old now, isn't really worth it.

0

Perhaps someone decided that it’s better (that is: the text would be easier to read, the images would look higher-quality) to left it 1:1 rather than trying to fit multiple (about 1,21) device independent pixels on a single physical pixel.

0

dp stands for device independent pixel. A pixel that is independent of how it is displayed on the screen. Programmatically, you can have 768 addressable pixels to display an image on the screen but it has nothing to do with the number of hard physical pixels there are on the screen. How the screen is mapped out by the device which, in this case, has an actual count of 160 real pixels on the screen per inch. So one addressable pixel may physically contain x number of real hardware pixels.

That has more to do with zooming/scaling of the image so it's clear and presentable at larger sizes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.