Reputation: 4530
I am using ConstraintLayout Flow want to create layout like below
But not able to achieve above using ConstraintLayout Flow my layout looks like below
Below is my code
<androidx.constraintlayout.helper.widget.Flow
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imgAiport"
app:constraint_referenced_ids="tvDateLbl,tvTimeLbl,tvAirlineLbl,tvDate,tvTime,imgAirlineLogo"
app:flow_wrapMode="aligned"
android:layout_margin="15dp"
app:flow_maxElementsWrap="3"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
How to correctly align elements using ConstraintLayout Flow
Upvotes: 4
Views: 2260
Reputation: 4776
I think the only options here is to make all these TextView's
to one width size with text gravity to the start.
Upvotes: 7