Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
I have a nested MotionLayout configuration, wherein a MotionLayout contains a HorizontalScrollView, and the children of this view are dynamically added MotionLayouts. The objective is to synchronize the two MotionLayouts, so when the parent's onTransitionStarted is triggered, I call transitionToEnd on all the child MotionLayout views.
I've set fixed width and height for the child MotionLayouts using getConstraintSet and setting the constrainHeight and constrainWidth attributes.
However, I've encountered an issue where sometimes, after the transition is completed, the width and height of the child MotionLayouts appear incorrect and smaller than intended, leading to a buggy appearance.
Steps to reproduce:
1. Create a MotionLayout file (let's call it "parent_motion_layout.xml") and add a HorizontalScrollView as a child. This layout will serve as the parent container for dynamically added child MotionLayouts.
2. Create another MotionLayout file (let's call it "child_motion_layout.xml"), which will be the layout dynamically added to the HorizontalScrollView in step 1. Make sure to set the constraints for both the collapsed and expanded modes appropriately, with different widths and heights.
3. Set up the MotionScene files for both layouts(parent and child) in a way that transitions occur from the expanded mode to the collapsed mode for both MotionLayouts. Define the initial state as collapsed mode for both layouts. Ensure that the collapsed mode has a smaller width and height compared to the expanded mode.
Video of the bug: