0

I have a question that I can use many ConstraintLayout Tag in site a Parent ConstraintLayout? Are they over weight for UI in android? Like this image: Thank you very much! enter image description here

I had an interview and i was told that 2 constraintlayout should not be used in each other and I tried to search the results for this question but not yet, I hope I can get the answer reply from you. Thank you!

  • There are very few times where you should need a nested ConstraintLayout - the whole point of it was to avoid all the nested layouts required when you used things like LinearLayout. You can use things like barriers and other ConstraintLayout tools to make most layouts in a single container. You will get more useful answers though if you ask the question differently - e.g. "I want to make this layout, how can I do it without using a nested ConstraintLayout?" – Tyler V Aug 05 '23 at 14:35
  • Does this answer your question? [Nested Constraint Layout? is it a bad practice or not?](https://stackoverflow.com/questions/53813792/nested-constraint-layout-is-it-a-bad-practice-or-not) – Tyler V Aug 05 '23 at 14:42
  • The main purpose of constraint layout is to avoid the nested, more the nested view will there more the rendering time will take, on the other hand we can make almost every complex design using constraint layouts with single parent container. Things is you can use it but ideally it is a bat practice. – Shyam Sunder Aug 07 '23 at 18:25

0 Answers0