Skip to content

Commit 4e6827a

Browse files
update
1 parent c7bd07b commit 4e6827a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

readme/Flutter和原生Android控件对比.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,38 @@ Algin|alginParentXXX属性
1919
resizeToAvoidBottomPadding|android:windowSoftInputMode=”adjustResize属性
2020
SingleChildScrollView|ScrollView
2121
CustomScrollerView|Recyclerview
22+
23+
24+
----
25+
26+
27+
Image里面的BoxFit参数介绍:(相当于Android的ImageView的scaleType参数)
28+
29+
// fill 通过篡改原始宽高比来填充目标box
30+
31+
![](https://flutter.github.io/assets-for-api-docs/painting/box_fit_fill.png)
32+
33+
/// contain 在尽可能大的情况下,仍然将源完全包含在目标框中。
34+
35+
![](https://flutter.github.io/assets-for-api-docs/painting/box_fit_contain.png)
36+
37+
/// cover 尽可能小,同时仍然覆盖整个目标框。
38+
39+
![](https://flutter.github.io/assets-for-api-docs/painting/box_fit_cover.png)
40+
41+
/// fitWidth 确保显示源的全部宽度,而不管这是否意味着源垂直溢出目标框。
42+
43+
![](https://flutter.github.io/assets-for-api-docs/painting/box_fit_fitWidth.png)
44+
45+
/// fitHeight 确保显示源的全部高度,而不管这是否意味着源水平地溢出目标框。
46+
47+
![](https://flutter.github.io/assets-for-api-docs/painting/box_fit_fitHeight.png)
48+
49+
/// none 在目标框中对齐源(默认为居中),并放弃位于框外的源的任何部分。源图像未调整大小。
50+
51+
![](https://flutter.github.io/assets-for-api-docs/painting/box_fit_none.png)
52+
53+
/// scaleDown 在目标框中对齐源(默认为居中),如果需要,将源缩小以确保源适合该框。这与contain的内容相同,如果该内容会收缩图像,那么它就是none。
54+
55+
![](https://flutter.github.io/assets-for-api-docs/painting/box_fit_scaleDown.png)
56+

0 commit comments

Comments
 (0)