I am going to start using MotionLayout
.
After replacing existing ConstraintLayout
with the MotionLayout,
which has a simple motion scene,
I noticed that androidx.constraintlayout.widget.Group
is not working anymore.
Initially, I showed one of the two groups depending on a condition,
but now both of them are visible, even though I set visibility to GONE
.
Could I somehow get MotionLayout to work with Groups, or I should use different MotionLayouts?
MotionLayout is a layout type that helps you manage motion and widget animation in your app. MotionLayout is a subclass of ConstraintLayout and builds upon its rich layout capabilities. As part of the ConstraintLayout library, MotionLayout is available as a support library and is backwards-compatible to API level 14.
A ConstraintLayout is a ViewGroup that allows you to position and size widgets in a flexible way. ConstraintLayout allows you to create large and complex layouts with a flat view hierarchy (no nested view groups).
The most recent version of ConstraintLayout is 2.0.0-beta2 and verified that MotionScene does not care about androidx.constraintlayout.motion.widget.Group
. So if you want to change visibility or elevation value you should handle it individually for each View instead of applying to the virtual Group.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With