constraintlayout
constraintlayout copied to clipboard
Starting from version 2.1.0, ConstraintLayout is sporadically laying out children incorrectly
The children of a ConstraintLayout are sporadically being laid out incorrectly, starting version 2.1.0. This error happens in Android Studio preview, on an emulator and on a physical device.
This image below, shows the error, where the child (with blue border) is shown at the top of the parent, instead of at the bottom. This happens whether I use a vertical flow or a vertical chain to layout the children. This very same layout used to work fine in 2.0.4
If I just change the version to 2.0.4, Android Studio preview starts laying out correctly (see below). The exact same XML works as correctly in the emulator and device as well, if I use 2.0.4.
The funny thing is that some instances of the same ConstraintLayout view layout fine, while others don't. Here are two adjacent elements of a RecyclerView. Both are the same layout - one is rendering correctly, while the other isn't
The layout file can be found here. sales_order_card.zip
The same problem happens in other layouts as well, and is not unique to this layout. This happens both on SDK 26 and SDK 30. The problem persists in version 2.1.1 as well.
Hi All, I also recently updated to 2.1 and my app UI is also broken.
I am creating customview inheriting from constraint layout.
Looks like child is not getting rendered vertically inside the layout
Any updates? This bug is reproducible even in version 2.1.13. This is a pretty serious bug, and it is suprising that there is no resolution even after so many months.
Same as @vijtheveg , I am often facing this bug. Has anyone solved? In my case, this problem appears with only Android8, 9, 11 and 12.
Just found this issue and finally understand what happened. I enabled R8 full mode last week and published the update, then I received bug reports about text being overlapped from users this week. It took me a while to figure it out because this bug only happens on a small amount of device models. This bug still exists in ConstraintLayout 2.1.4
Just found this issue and finally understand what happened. I enabled R8 full mode last week and published the update, then I received bug reports about text being overlapped from users this week. It took me a while to figure it out because this bug only happens on a small amount of device models. This bug still exists in ConstraintLayout 2.1.4
Thanks @evilhawk00! Any idea when this bug will be fixed?