Location constraints relative to relative layout

I mainly designed my views using the Relative layout, since it works great when you put things from the right edge, in the center, or just relative to each other. This would be great with different screen sizes, so that the views are more common.

With the introduction of the constraint layout, I believe that it is more powerful, and it achieves the same goals, while still providing more flexibility.

Does this mean that the relative layout is no longer needed and can be replaced by Constraint all the time? Is there a situation where you should not go to limit the restrictions and instead relate to the relative layout?

thank

+4
source share
1 answer

It is not much different from other layouts that you are probably already using (e.g. RelativeLayout or LinearLayout). Attributes are very similar to the attributes used with Relative Layout.

This is primarily designed as a visually oriented tool. The visual editor is designed so that developers interact with their layouts.

The main goal of this new layout is to help developers create complex layouts that are quickly optimized for quick deployment. In fact, its goal is to reduce layout hierarchies caused by other types of layouts.

+2
source

Source: https://habr.com/ru/post/1677127/


All Articles