I've learned about the ConstraintLayout which is much more flexible than RelativeLayout or LinearLayout. I am wondering if I can use it rather than RelativeLayout or LinearLayout. But I have a situation where I find ConstraintLayout can't do what I want, if it doesn't contain a nested viewgroup.
For instance, what if I want to do animation to a group of views (which could have been put into a LinearLayout) or I want to have a scrollview?
For the all things above, I still have to have a nested viewgroup.
How can I achieve this with ConstraintLayout?
You can nest other layouts inside ConstraintLayout. The whole point is you avoid multiple nesting using it, not all the nesting altogether.
Constraint Layout: This new layout is a flexible layout manager for your app that allows you to create dynamic user interfaces without nesting multiple layouts. It is distributed as a support library that is tightly coupled with Android Studio and backwards compatible to API Level 9.
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