Two screens with the same dimensions but different resolutions

独自空忆成欢 提交于 2019-12-20 05:16:08

问题


Assume we have two android devices with the same screen dimensions, but with different resolutions. Is the following true or not: if dp unit is used to set the sizes of all views, then both screens will display the same amount of contents and the only difference will be the crispness of the views.


回答1:


If the screens are the same physical dimension but have a differing dpi and you've used the dp (Density-independent pixel) then they should be the same as this is the point of the dp unit.

This link shows more about the handling of screen sizes and derivation of dp values.




回答2:


Yes, dp (or dip) means density independent pixel. Source

So it's independent of the pixel density of the device.



来源:https://stackoverflow.com/questions/31100698/two-screens-with-the-same-dimensions-but-different-resolutions

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