ViewGroups that wrap their children with line breaks if there is no space in the current line

I tried old solutions here: Differences in widgets for Android

Is there a new correct way to implement this feature?

0
android android-viewgroup
May 10 '16 at 19:49
source share
1 answer

The new FlexboxLayout library from Google.

<com.google.android.flexbox.FlexboxLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" app:flexWrap="wrap" app:alignItems="stretch" app:alignContent="stretch" > <TextView android:layout_width="120dp" android:layout_height="80dp" /> <TextView android:layout_width="80dp" android:layout_height="80dp" /> <TextView android:layout_width="160dp" android:layout_height="80dp" /> </com.google.android.flexbox.FlexboxLayout> 
+2
May 10 '16 at 19:49
source share



All Articles