

It's all about knowing how to connect views with their parents and siblings. If used correctly, ConstrainLayout also simplifies designing views that look good when the screen is in landscape mode. Goolge released Constraint Layout in the 2016 I/O and this method has been widely recommended by and for developers to design responsive UI.Īs the official Android developer documentation states, ConstraintLayout allows developers to create complex layouts with a flat view hierarchy, which means there's no need to use nested ViewGroups, which helps for build efficency, memory usage and the device will take less time to create the view. This causes a well known issue for Android developers: building an app that run smoothly and look good in as many devices as possible. According to Statista's article about OS worldwide distribution around 85% of the smartphones in the world run on Android and there are thousands (maybe millions) of different models running with this operating system. There's a lot of devices with the Android OS with different screen sizes, and this can be an issue for developers.Īs we know, the Android OS runs on a great variety of smartphones.

What is ConstrainLayout and why do I need it?

In Part II, I'll make sure to cover Guidelines and other features. Some of the features that I'll get into are: In this post I will talk about the advantages of ConstraintLayout, a tool that completely changed the way I design views for Android apps. It helps me to organize my ideas and it can be useful for developers who are getting started with Android development. Since I've been learning how to develop mobile apps for Android, I would like to write posts about some useful things I've run into.
