Why 2 devices of same size, same resolution, claims different density? [closed]

旧城冷巷雨未停 提交于 2019-12-04 03:26:06

问题


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 to have different pixel densities.

This contradicts with my understanding of pixel density.

Which of the following is true?

  1. My understanding of pixel density is wrong. All information on the page is correct;
  2. The information on the page is wrong;
  3. On HTC One M9, although the screen size is 5.0, a small part of it is not used to display (i.e. Actual display size is smaller than Google Pixel)
  4. Something that I can't imagine

回答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.



来源:https://stackoverflow.com/questions/49148300/why-2-devices-of-same-size-same-resolution-claims-different-density

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!