Inconsistent Behaviour between 1.1.1 and 2.0.1
seventhmoon opened this issue · comments
Inconsistent behaviour between 1.1.1 and 2.0.1, on non-Pixel devices, mostly old models.
Strange blank area added (child element warp_content vs match_parent ??)
- I have searched existing issues and confirmed this is not a duplicate
Issues and steps to reproduce
- A NestedScrollView with FlexboxLayout in it. (match_parent, to fit the screen)
- Inside the FlexboxLayout, include a few MaterialCardView (wrap_content)
Expected behavior
As Screen Shot A, not Screen Shot B nor C
Version of the flexbox library
2.0.1
Link to code
Please link to the code we can use to reproduce this issue.
A complete project we can build/run is preferred, if you can't provide one, please show
us relevant code
Please message me your ldap and I'll share to you.
Thanks for the report. Let me take a look.
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_headline"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/viewgroup_info"/>
<include
layout="@layout/viewgroup_info"
android:id="@+id/viewgroup_info"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_headline"/>
</androidx.constraintlayout.widget.ConstraintLayout>
If we have a ConstraintLayout inside a FlexboxLayout, which has a app:layout_constraintEnd_toEndOf="parent"
in the layout.
In 2.0.0 and 2.0.1, on some devices, this will make the height of the layout to be 3-4 times of screen height.