If I use 1.0.2, the 3 images' width is average, and the height of them is computed by the radio which I set. If I use 1.1.0, the height of them is 0dp
and I can't see nothing, unless I set
android:layout_height="match_parent"
in the root ConstraintLayout
.
Is it a bug? Here is my code:
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv0"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="#FF0000"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/iv1"
app:layout_constraintDimensionRatio="2:1"/>
<ImageView
android:id="@+id/iv1"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="#00FF00"
app:layout_constraintDimensionRatio="2:1"
app:layout_constraintLeft_toRightOf="@id/iv0"
app:layout_constraintRight_toLeftOf="@+id/iv2"/>
<ImageView
android:id="@+id/iv2"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="#0000FF"
app:layout_constraintDimensionRatio="2:1"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv1"/>
</android.support.constraint.ConstraintLayout>