How to make middle Element in ConstraintLayout Chain RTL extend to parent when first part is set to GONE?

Using ConstraintLayout 1.0.2

Let's say we have elements A B C

In RTL it becomes C B A

If C visibility is set to GONE it becomes A B

B has match_constraint width

while A has a fixed width of only 48dp

So B's width will expand to the parent.

It works normally in LTR but when it comes to RTL.

C B A

C is GONE

B is also GONE

A is still present.

_ _ A

Normal

Normal

C is GONE LTR

enter image description here

C is GONE RTL

enter image description here

1 answer

  • answered 2018-02-13 03:00 Gian Patrick Quintana

    Apparently this behavior is already fixed if you update to the current 1.1.0-beta5 of ConstraintLayout.