I’m considering Flow as a tool for a tag system, and it seems to be working fine, but I haven’t found a way to align from top left to right. Is there a way to do this? I’m not using Jetpack Compose, I’m interested in 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" />
[As is](https://i.sstatic.net/nuUMpAyP.png)
[How it should be, but with the bottom attached](https://i.sstatic.net/AJtWWhl8.png)
I found a workaround, which is to not attach the Flow to the bottom and use wrap_content for the height, but in this case, the container can overflow. I can also set a specific size, but in this case, the container can also overflow.