Hy,
I want to have 2 Views equally spread the screen width in a ConstraintLayout. Used chains and weight to achieve that.
<Button
android:id="@+id/buttonLeft"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:text="Left"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toLeftOf="@+id/guidelineLeft"
app:layout_constraintRight_toLeftOf="@+id/buttonRight"
tools:layout_editor_absoluteY="0dp"/>
<Button
android:id="@+id/buttonRight"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_marginRight="0dp"
android:text="Right"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@+id/buttonLeft"
app:layout_constraintRight_toLeftOf="@+id/guidelineRight"
tools:layout_editor_absoluteY="0dp"/>
Now i want to hide the right View and the left to grow to fill the width.
I thought this could work out of the box because of the visiblity behaviour
But as the left button has a constraint on the right one, it does not grow.
Any ideas how to solve that?