Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline TextViews use all available spaces #434

Open
MarcDahlem opened this issue Jun 6, 2018 · 2 comments
Open

Multiline TextViews use all available spaces #434

MarcDahlem opened this issue Jun 6, 2018 · 2 comments

Comments

@MarcDahlem
Copy link

  • [ 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)

grafik

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>
@C0deWithAj
Copy link

@MarcDahlem Did you resolve ? I am still having this issue.

@MarcDahlem
Copy link
Author

Unfortunately no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants