分辨率

tenex:5.3英寸 = 135mm,长宽比16:9,

DisplayMetrics{density=1.5, width=540, height=960, scaledDensity=1.5, xdpi=240.0, ydpi=240.0}

540^2+960^2=1101.45^2

dpi=1101.45 / 5.3 = 207.8 对应于hdpi

density = dpi/160 = 207.8/160 = 1.3

1dp = 1.5px

米2s:4.3英寸=110mm ,长宽比16:9,长X宽=95.19mmX53.55mm

DisplayMetrics{density=2.0, width=720, height=1280, scaledDensity=2.0, xdpi=160.421, ydpi=160.157}

720^2+1280^2=1468.6^2

dpi=1468.6 / 4.3 = 341.5 对应于xhdpi

density = dpi/160 = 341.5/160 = 2

1dp = 2px

红米1s:4.7英寸 = 120mm,长宽比16:9,手机长X宽=137mmx69mm

DisplayMetrics{density=2.0, width=720, height=1280, scaledDensity=1.72, xdpi=315.31, ydpi=315.65}

720^2+1280^2=1468.6^2

dpi=1468.6 / 4.7 = 312.5 对应于xhdpi

density = dpi/160 = 312.5/160 = 2

1dp = 2px

小米3:DisplayMetrics{density=3.0, width=1080, height=1920, scaledDensity=3.0, xdpi=449.704, ydpi=447.412}

三星note4 dpi : 5.7寸2560*1440dpi