1414
1515 <TextView
1616 android : layout_width =" match_parent"
17- android : layout_height =" 248dp "
17+ android : layout_height =" 496mm "
1818 android : background =" @color/colorPrimary"
1919 android : gravity =" center"
20- android : text =" H-248dp \n(Height Total:667dp )"
20+ android : text =" H-496mm \n(Height Total:1334mm )"
2121 android : textColor =" #fff"
22- android : textSize =" 20sp" />
23-
24- <!-- 把高度设置为 2 dp 的原因是想展示 AndroidAutoSize 可以把适配精度精确到 1 dp (写 2 dp 是为了更显眼, 写 1 dp 也是可以的)
25- 如果您看得到屏幕中间高度为 2 dp 的白色间隙, 说明本适配方案, 能精确适配, 您可以放心填写 dp 值-->
22+ android : textSize =" 50sp" />
2623
2724 <TextView
2825 android : layout_width =" match_parent"
29- android : layout_height =" 2dp "
26+ android : layout_height =" 2mm "
3027 android : background =" #fff"
3128 />
3229
3330 <TextView
3431 android : layout_width =" match_parent"
35- android : layout_height =" 100dp "
32+ android : layout_height =" 200mm "
3633 android : background =" #0f3"
3734 android : gravity =" center"
38- android : text =" H-100dp "
35+ android : text =" H-200mm "
3936 android : textColor =" #fff"
40- android : textSize =" 20sp "
37+ android : textSize =" 50sp "
4138 />
4239
4340 <TextView
4441 android : layout_width =" match_parent"
45- android : layout_height =" 125dp "
42+ android : layout_height =" 250mm "
4643 android : background =" #d0f"
4744 android : gravity =" center"
48- android : text =" H-125dp "
45+ android : text =" H-250mm "
4946 android : textColor =" #fff"
50- android : textSize =" 20sp " />
47+ android : textSize =" 50sp " />
5148
5249 <TextView
5350 android : layout_width =" match_parent"
54- android : layout_height =" 192dp "
51+ android : layout_height =" 386mm "
5552 android : background =" #d21"
5653 android : gravity =" center"
57- android : text =" H-192dp "
54+ android : text =" H-386mm "
5855 android : textColor =" #fff"
59- android : textSize =" 20sp " />
56+ android : textSize =" 50sp " />
6057 </LinearLayout >
6158</LinearLayout >
0 commit comments