I’m considering Flow as a tool for a tagging system, and it seems to work fine. However, I haven’t found a way to align items at the top from left to right. Is there a way to achieve this? I’m not using Jetpack Compose, I’m looking for a solution for XML layout.
<androidx.constraintlayout.helper.widget.Flow
android:id="@+id/flow1"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="horizontal"
app:constraint_referenced_ids="textView1,textView2,textView3,textView4,textView5,textView6,textView7,textView8,textView9,textView10,textView11,textView12,textView13,textView14,textView15,textView16,textView17,textView18"
app:flow_horizontalAlign="start"
app:flow_horizontalGap="4dp"
app:flow_horizontalStyle="packed"
app:flow_verticalAlign="top"
app:flow_verticalGap="4dp"
app:flow_verticalStyle="packed"
app:flow_wrapMode="chain"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />[enter image description here](https://i.sstatic.net/MB9vlxDp.png)
I found a makeshift method by not attaching Flow to the bottom and using wrap_content for height, but in this case, the container can overflow. Another option is to set a specific size, but again, this might cause the container to overflow.