Published on December 14, 2016 by Android Developers

The new Layout Editor in Android Studio 2.2 has some surprises, including a new blueprint mode, revamped properties inspector and support for ConstraintLayout, a new way to define layouts for your apps.

In this Android Tool Time episode Wojtek Kaliciński shows you the basics of working with ConstraintLayouts in the visual editor. If you want to try it out yourself, you can find our codelab here: codelabs.developers.google.com/codelabs/constraint-layout

When you’re familiar with the layout editor interface, read the rest of our Medium article where you’ll find some more advanced tips and tricks for ConstraintLayout: medium.com/google-developers

Leave a Reply

12 Comments on "Building interfaces with ConstraintLayout in Android Studio"

Notify of
avatar

a9595100
Guest
a9595100
20 days 4 hours ago

Great video

Alexis Morin
Guest
Alexis Morin
30 days 4 hours ago

This seems like an upgrade to RelativeLayout. Well done Android team!

Tu Yimin
Guest
Tu Yimin
30 days 4 hours ago

FlexLayout is another approach, which use Java code directly in layout parameters. it's more powerful and easy to understand, but does not come with a fancy UI editor (you have to write code)

Roman Pavliuk
Guest
Roman Pavliuk
30 days 14 hours ago

No roboto voice(

Pedro Varela
Guest
Pedro Varela
30 days 21 hours ago

it seems magical.. in practice Constraint Layout are just a waste of time.

pratham kesarkar
Guest
pratham kesarkar
29 days 17 hours ago

Joe Goble relative layout need two passes for calculating the position of the view as well as its height however constraint layout does that in one pass .But I am not sure whether it is production ready

Pedro Varela
Guest
Pedro Varela
29 days 22 hours ago

Joe Goble It has more benefits but if you have a complex UI it just a pain in the "layout"

Joe Goble
Guest
Joe Goble
29 days 23 hours ago

Agreed. I don't really see the benefits over using a Relative Layout

Furkan Elci
Guest
Furkan Elci
30 days 23 hours ago

I always have a problem with multiple screen sizes with this layout.Maybe i do something wrong i always use linearlayout on my projects.

saabzero
Guest
saabzero
1 month 2 minutes ago

Is there a performance difference when comparing ConstraintLayout to a custom ViewGroup?

saabzero
Guest
saabzero
30 days 21 hours ago

My theory is that a well-written custom ViewGroup can achieve exactly the same as a ConstraintLayout (With minimal view hierarchy depth) but still with better performance as no xml has to be parsed and inflated. The downside of course is that it has no fancy and easy UI editor like ConstraintLayout now has… but i still would be interested if the performance gain of a custom ViewGroup is worth the hassle, as i tend to like ViewGroups 🙂

Kriss
Guest
Kriss
30 days 21 hours ago

It is meant to be faster than RelativeLayout or deeply nested views. Custom views may be fast or slow, depending on how they work.

wpDiscuz