已知分辨率、DPI,求屏幕尺寸
-
已知分辨率为 x * y 像素,DPI 为 z,屏幕尺寸为
√(x^2 + y^2) / z -
例如,已知分辨率为 1400 * 800,DPI 为 120,屏幕尺寸为
√(1400^2 + 800^2) / 120 ≈ 13.44
Android Studio 自定义预览尺寸
点击 【Device for Preview】→点击 【Add Device Definition】

点击 【New hardware profile】→设置 【Device Name】、【Device Type】、【Screen】→点击 【Finish】
