Reputation: 481
If the weight (layout_constraintHorizontal_weight) of view progress_remaining is 0 and the weight of progress is 1 it is not working as before (and expected).
The view progress with weight 1 has width 0 and and progress_remaining with weight 0 takes over all the space.
With 0.0001 and 1 everything looks fine.
This problem occurcs with constraint layout v1.1.0 (worked before with v1.0.2)
Am I missing something? Bug?
Thx.
Example:
<View
android:id="@+id/progress"
android:layout_width="0dp"
android:layout_height="3dp"
android:background="@color/blue"
app:layout_constraintBottom_toBottomOf="@+id/header_image"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/progress_remaining"/>
<View
android:id="@+id/progress_remaining"
android:layout_width="0dp"
android:layout_height="3dp"
android:background="@color/red"
app:layout_constraintBottom_toBottomOf="@+id/header_image"
app:layout_constraintHorizontal_weight="0"
app:layout_constraintLeft_toRightOf="@+id/progress"
app:layout_constraintRight_toRightOf="parent"/>
Upvotes: 4
Views: 1133
Reputation: 481
Marked as Fixed Fixed in 1.1.1
https://issuetracker.google.com/issues/80149154
Upvotes: 1