我很纳闷,5.0英寸、6.1英寸的华为手机能将相同的布局显示完整,然而小米note的手机能显示完整但是最底下却又一块空白,3个手机的分辨率都是1920*1080,不知道这是为什么???
小伙看你根骨奇佳,潜力无限,来学PHP伐。
Their ppi is different, the same dp displays different sizes. dp and px conversion formula: dp*ppi/160 = px. For example, 1dp x 320ppi/160 = 2px.
PPI = Pixels per inch, the number of pixels per inch, that is, "pixel density"
ppi is:
PPI = √(length pixels² + width pixels²) / screen diagonal inches
The resolution is the same, but the screen size must be different. Then you use the dp unit, which is related to the pixel density, so the display will be different.
Their ppi is different, the same dp displays different sizes.
dp and px conversion formula:
dp*ppi/160 = px. For example, 1dp x 320ppi/160 = 2px.
PPI = Pixels per inch, the number of pixels per inch, that is, "pixel density"
The calculation method ofppi is:
PPI = √(length pixels² + width pixels²) / screen diagonal inches
The resolution is the same, but the screen size must be different. Then you use the dp unit, which is related to the pixel density, so the display will be different.