Sunday 8 January 2017

Android What? Why? Need of Constraint Layout

What is Constraint Layout?

Constraint Layout ("CL") is the latest addition to Android’s collection of layouts. Constraint Layout is a layout that will feel very similar to RelativeLayout at first glance, CL is more powerful and versatile. CL aims to make developing layouts easier, faster, and more intuitive, while improving performance at runtime. If you are interested in speeding up your development time using the updated Layout Editor ("LE").

Why do we need Constraint Layout?

Speed!!! In many ways, the development of CL and the new LE are all about speed. The main benefits of CL is its ability to help developers avoid the need to nest ViewGroups, in particular, weighted of multiple LinearLayouts, RelativeLayouts and Views. It will be the darker side of doing the UI designs, The reason to avoid nesting is because the rendering time can grow exponentially with each level of nesting. If the layout time grows too large, your app will start dropping frames; resulting in choppy transitions.  Hence this CL breaks those barriers and provides the concrete floor to design the extensive and rich user interfaces

Secondly, CL is being built from the ground up alongside the new LE. This means the Google Tools developers have taken the time to ensure that layout development with CL and LE is as intuitive and efficient as possible.