具有相同尺寸但分辨率不同的两个屏幕 [英] Two screens with the same dimensions but different resolutions

查看:652
本文介绍了具有相同尺寸但分辨率不同的两个屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我们有两个具有相同屏幕尺寸但分辨率不同的android设备.是否满足以下条件:如果使用dp单位设置所有视图的大小,则两个屏幕将显示相同数量的内容,唯一的区别在于视图的清晰度.

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.

推荐答案

如果屏幕的物理尺寸相同,但dpi不同,并且您使用的是dp(与密度无关的像素),则它们应该与这就是dp单元的重点.

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.

链接显示了有关屏幕尺寸处理和dp派生的更多信息值.

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

这篇关于具有相同尺寸但分辨率不同的两个屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆