1. Basic knowledge of adaptation
Screen size screen diagonal length per inch 1 inch = 2.54 cm not very important
Screen resolution horizontal longitudinal pixel point unit px 1px = 1 pixel point resolution higher pixel better longitudinal width * Transverse width 1920 * 1080
Screen pixel density pixel dots per inch unit dpi
2.Nexus 5
Screen 4.95 inch
1920 * 1080
DPI = 445
1920^2 + 1080^2 = The pixel points on the diagonal are divided by 4.95 = 445
Base 1DP = 1px at DPI 160
Main fit 480*800 720*1280 320*480
480*854 540*960 1080*1920
3.
480 * 160dpi 320px 320DP
* 480 240dpi 480px 320DP 1DP = 1.5px
DP is the same, but PX is different
MDPI 120dpi-160dpi
HDPI 160dpi-240dpi
XHDPI 240dpi-320dpi
XXHDPI 320dpi-480dpi
Xxxhpdi 480dpi-640dpi
Learn more about http://www.apkbus.com/design Chinese design website
4.
SP Font Size
12sp
14SP Small
18SP Medium
22SP Large
5.
Weight
Calculated width = width of original width + remaining space%
0DP and Match-parent, respectively
Screen width is L
Button 1 match-parent
2/3 L = L + (l-2l) *1/3l = l-1/3l = 2/3 L
Button 2
1/3 L = l + (l-2l) *2/3l = l-2/3l = 1/3 L
Button 2 0DP
1/3 L = 0 + 1/3l = 1/3 L
6.
Pad 7 inch
Layout-large 3.2 ago
LAYOUT-SW600DP after 3.2
Land port
7. Automatic stretching. 9.png
Working with draw points in as to Extrude
Padding 0DP
Android Basics (1)