简体   繁体   中英

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 ABC

In RTL it becomes CBA

If C visibility is set to GONE it becomes AB

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.

CBA

C is GONE

B is also GONE

A is still present.

_ _ A

Normal

正常

C is GONE LTR

在此处输入图片说明

C is GONE RTL

在此处输入图片说明

显然,如果您更新到ConstraintLayout的当前1.1.0-beta5,此问题已得到解决。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM