Can one relative layout / linear layout can have multiple constraint layouts? Do they affect on the performance of application while inflating?
Also, can one constraint Layout can have multiple constraint layouts?
Can one relative layout / linear layout can have multiple constraint layouts? Do they affect on the performance of application while inflating?
Also, can one constraint Layout can have multiple constraint layouts?
If you are talking about nesting view groups(relative layout/linear layout/constraint layout) inside another view group, yes it is possible. But the issue with nesting view groups is each of the view group has to perform calculations to constrain its children. This is usually done in a depth-first search manner. So it will affect the inflation speed and thus the overall performance of the layout.
It is always better to keep the hierarchy as flat as possible. Which means maximum avoid the nesting of view groups wherever possible.
Nested view hierarchies should be avoided because it takes more time in rendering. To overcome from box-model logic (in HTML), ConstraintLayout has been introduced. It is clearly mentioned in the documentation.