In new Android Studio 2.2 the Constraint Layout is introduced, I had searched and read about this new layout here and here. and in this link I had read about differences between Constraint and Relative layouts, but still some questions remain:
- Can we replace
ConstraintLayoutcompletly, as mentioned here?
- Do devices with old versions can support
- For designing apps with
ConstraintLayoutwe have to update to Android Studio 2.2?
- with using
ConstraintLayoutwe don’t need to write many dimens.xml for all screen resolution to have a responsive app?
ConstraintLayoutdoes all that
RelativeLayoutdoes, and more
- It’s supported starting from API level 9 (Gingerbread) — ie. 99.9% of devices
- Yes. You can edit the XML by hand too, but the editor in 2.2 is recommended
- It depends what you want to do — using dimens might still be useful (for example, you might want roughly the same layout, but with different margins).
The another fact good to know is that ConstraintLayout provides much better performance than RelativeLayout. Especially nested RelativeLayouts can make your performance worse.