ViewGroup that wrap its children with line breaking if there is no space in the current line
- 阅读更多 关于 ViewGroup that wrap its children with line breaking if there is no space in the current line
问题 I have tried old solutions here: Line-breaking widget layout for Android Is there a new proper way to implement this functionality? 回答1: New FlexboxLayout library by Google do this. <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