Skip to content Skip to sidebar Skip to footer

Why 2 Devices Of Same Size, Same Resolution, Claims Different Density?

Please take a look at Material IO's device metrics: Pay attention to Google Pixel and HTC One M9. These 2 devices have the same physical size, same number of pixels, but claimed t

Solution 1:

A friend gave me an explanation and I think it is very likely to be the correct answer:

The answer is: 4. Something that I can't imagine

(1) The density here is not pixel density. It is dp-density.

If you click on Google Pixel, you will see px/in is 441 which is the same as HTC One M9. This means their pixel densities are the same. And next to this value you see a dp/in which is different among these 2 devices. That correspond to the density on the list (2.6 and 3.0)

(2) The density (dp-density) here does not necessarily has physical meaning

This is due to the fact that under same pixel density, Google and HTC decided to define one unit of dp differently. That's why they have different values of dp even under same pixel density. This will create an effect that even if you specify the same value of dp, the View will have different physical size on these 2 devices.
Only if the whole world conform to the standard of 1x = 160dpi, dp can be used as a physical metrics.


Post a Comment for "Why 2 Devices Of Same Size, Same Resolution, Claims Different Density?"