You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-5Lines changed: 12 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,14 @@ Add the following dependency to your `build.gradle` file:
10
10
11
11
```
12
12
dependencies {
13
-
implementation 'com.google.android:flexbox:1.1.1'
13
+
implementation 'com.google.android:flexbox:2.0.0'
14
14
}
15
15
```
16
16
17
+
**Note that the default values for `alignItems` and `alignContent` for `FlexboxLayout` have been changed from `stretch` to `flex_start` starting from 2.0.0, it may break the existing apps.
18
+
Please make sure to set `stretch` explicitly if you want to apply the behavior of `stretch`.**
19
+
20
+
17
21
**Note that starting from 1.1.0, the library is expected to use with AndroidX. Please migrate to [AndroidX](https://developer.android.com/jetpack/androidx/migrate) if you use 1.1.0 or above.**
18
22
19
23
**Please use 1.0.0 if you haven't migrated to AndroidX.**
@@ -162,23 +166,23 @@ Here is a quick overview of the attributes/features comparison between the two i
162
166
163
167
*__alignItems__
164
168
* This attribute controls the alignment along the cross axis. Possible values are:
but as explained above, Android developers will benefit by having this attribute for having
370
374
more control over when a wrapping happens.
371
375
376
+
(5) Default values for `alignItems` and `alignContent` are set to `flex_start` instead of `stretch`.
377
+
* Setting `stretch` for the `alignItems` is expensive because the children of `FlexboxLayout` are calculated more than twice. The difference is more obvious when the layout hierarchy is deeply nested.
378
+
372
379
## Xamarin Binding
373
380
Xamarin binding is now available on [NuGet](https://www.nuget.org/packages/FlexboxLayoutXamarinBindingAndroid/) thanks to [@btripp](https://github.com/btripp)
0 commit comments