Concept:
DPI (dots per inch): points per inch, initially used to measure the density of dots per inch on the print, and how many points the printer plays in an inch. The smaller the DPI value, the less fine.
PPI (Pixels per inch): The number of pixels per inch, when the concept of DPI is used on an electronic screen, it should be called the PPI.
For developers, DPI is Ppi,ppi dpi, which is collectively referred to as screen density.
PX (Pixel): units of pixels, can be understood as the actual length of units, just like meters, centimeters.
DP (device independent pixels): This is the unit of length in the Android system, which is the DIP (unit independent pixel).
Set a screen pixel density of da,b screen pixel density for db,a screen width of WA px,b screen for the WB px,a screen of La px length in the B screen should be scaled to lb px.
(la/da)/WA = (lb/db)/WB
DP, PX, DPI, PPI, density