Skip to content

Commit 45bd2e7

Browse files
authored
Improve the explanation for layout_flexGrow
1 parent 5dc384f commit 45bd2e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ view.setLayoutParams(lp);
200200
* __layout_flexGrow__ (float)
201201
* This attribute determines how much this child will grow if positive free space is
202202
distributed relative to the rest of other flex items included in the same flex line.
203+
If a flex item has a positive `layout_flexGrow` value, the item will take up the remaining
204+
space in the flex line. If multiple flex items in the same flex line have positive `layout_flexGrow`
205+
values, the remaining free space is distributed denepending on the proportion of their declared
206+
`layout_flexGrow` value. (Similar to the `layout_weight` attribute in the `LinearLayout`)
203207
If not specified, `0` is set as a default value.
204208

205209
![Flex Grow explanation](/assets/layout_flexGrow.gif)

0 commit comments

Comments
 (0)