flexbox-layout
flexbox-layout copied to clipboard
Multiline TextViews use all available spaces
- [ x] I have searched existing issues and confirmed this is not a duplicate
Issues and steps to reproduce
- Place two multiline text views side-by-side in a flexbox-layout
- If the texts are getting too long for the screen, they will have linebreaks.
- These linebreaks can lead to unexpected behaviour and free spaces, where it should not be (see screenshot)

Expected behavior
- The expectation is, that the free space between the key and the purple view is used and not left blank
Version of the flexbox library
- 1.0.0
Link to code
<com.google.android.flexbox.FlexboxLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:alignItems="center"
app:flexWrap="nowrap"
app:justifyContent="space_between"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/green"
android:text="Very long Key VerylongKey VerylongKeyVerylongKeyVery lon" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/colorAccent"
app:layout_flexGrow="1"
app:layout_flexShrink="0">
<View
android:layout_width="16dp"
android:layout_height="16dp"
android:background="@color/purple" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/red"
android:gravity="end"
android:text="Value" />
</com.google.android.flexbox.FlexboxLayout>
@MarcDahlem Did you resolve ? I am still having this issue.
Unfortunately no