0
に空きがない場合には改行でその子を包む私はここで古いソリューションを試してみました: Line-breaking widget layout for Android現在の行
は、この機能を実装するための新しい適切な方法はありますか?
に空きがない場合には改行でその子を包む私はここで古いソリューションを試してみました: Line-breaking widget layout for Android現在の行
は、この機能を実装するための新しい適切な方法はありますか?
新しいGoogle FlexboxLayoutライブラリによってこれを行います。
<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>