Turn to the user's answer:
1. DPI is the dot per inch, how many dots, PPI is Pixel per inch, pixels per inch, for the design of the display, Dpi=ppi.
The PPI calculation method is the sum of the length and width of each square, divided by the diagonal length (in inches). Principle can draw a rectangle of the Pythagorean theorem to calculate a calculation.
2. PPI indicates the point density of the display device, and DPI indicates the print point density.
3. Dip or DP, which is an Android development unit, 1DP indicates 1px length at a screen point density of 160ppi.
Since the Android device screen is numerous and cannot be developed individually for each screen, the number of pixels on different screens is calculated using the formula px=dp* (ppi/160).
Example: HVGA screen 320*480, generally 3.5 inch, calculate the point density is √ (320^2 + 480^2)/3.5 = 164, approximately equal to 160,1pd=1px
WVGA screen 480*800, press 3.8 inch screen count, point density Yes (480^2 + 800^2)/3.8 = 245, approximately equals 240,1dp=1.5px.
There is a higher resolution of the screen is not listed, in short, DP is to facilitate the adaptation of different screen units, at different screen densities, the physical length of the 1DP is the same.
User-aware
Links: https://www.zhihu.com/question/21220154/answer/18584739
Source: Know
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
The relationship between DP, DPI and PX in Android