I. Core concepts and units detailed 1. What is screen size, screen resolution, screen pixel density?
The larger the screen resolution, the clearer the phone
2. What is DP, dip, DPI, SP, px? What is the relationship between?
Dip:density Independent Pixels (density independent pixels) abbreviation. With 160dpi as the benchmark, 1dp=1px
DP: with dip
DPI: Unit of screen pixel density, abbreviation for "dot per inch"
PX: pixel, absolute unit of physics
Sp:scale-independent pixels abbreviations, which can be scaled automatically based on the text size preference. Google recommends that we use more than 12sp of size, usually can use 12SP,14SP,18SP,22SP, it is best not to use odd and decimal.
As can be seen, the mainstream resolution is the top six kinds: 1280x720, 1920x1080, 800x480, 854x480, 960x540, 1184x720, but we have a solution. After reading this article, you will probably be able to solve common screen adaptation problems.
Screen adaptation is mainly adapted to the above several large layout to meet the needs of mainstream models:
In Android, the same picture has different sizes in different resolutions
The full guide to Android screen adaptation