I added a LinearLayout
in a ConstraintLayout
and I get the following errors:
I would like to know if I added it wrong or if it is not possible.
Is it possible to add a LinearLayout in a ConstraintLayout or any another Layout?
It is possible to add any layout using ConstraintLayout, actually ConstraintLayout helps us to build complex layouts that are responsive, that is, they can be seen correctly in any size, density, etc ...
The message you have:
This view is not constrained vertically. At runtime it will jump to the left unless you add a vertical constraint (This view is not restricted vertically, at runtime it will jump to the left unless you add a vertical constraint).
To avoid this error as an example the following image, in your view look for the left end and drag the green dot to the right:
With this you will create a restriction (Constraint) so that the view always shows correctly horizontally
The same vertically:
To obtain the restrictions: