flexbox-layout icon indicating copy to clipboard operation
flexbox-layout copied to clipboard

When the layout_width="wrap_content", the child views are not in the right width.

Open zcbiner opened this issue 6 years ago • 4 comments

The code:

<com.google.android.flexbox.FlexboxLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:flexDirection="row">
        <TextView
            android:text="address:"
            android:layout_marginRight="10dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
        <TextView
            android:id="@+id/cotent"
            android:text="this is a long long long long something something and could"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
 </com.google.android.flexbox.FlexboxLayout>

In this way, I can't see the full "content" view. It's text is not complete in the screen.(if you can't see the photo, just click the link) photo Is there any idea to solve my problem? Thank you very much.

zcbiner avatar May 15 '18 08:05 zcbiner

Thanks for the report. Looks like this is a bug with FlexboxLayou in the measure phase. Let me keep this as a bug.

thagikura avatar May 15 '18 09:05 thagikura

surround textview with ConstraintLayout may help

liangtg avatar Oct 17 '18 02:10 liangtg

any solutions?

benioZhang avatar Feb 14 '19 06:02 benioZhang

Is it still not fixed?

dinomonster avatar May 24 '22 03:05 dinomonster