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

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

Notify of
avatar

bbnl vijayawad
Guest
bbnl vijayawad
8 days 18 hours ago

We tried in many combinations with respect to hdpi with sizes.The output of the installed apk showing different for different screens you are request to suggest us which sie is suitable for(phone/tablet)respect to hdpi,xhdpi,xxhdpi,xxxhdpi.

JokAr Michael
Guest
JokAr Michael
1 month 5 days ago

why your build so fast?

Seven I
Guest
Seven I
6 days 3 hours ago

They speed up the video….

Dev Landing
Guest
Dev Landing
27 days 4 hours ago

I believe constraint layout is faster than relative layout. But he could've just fast forwarded the video when he builds the app.

a9595100
Guest
a9595100
1 month 25 days ago

Great video

Alexis Morin
Guest
Alexis Morin
2 months 4 days ago

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

Tu Yimin
Guest
Tu Yimin
2 months 4 days 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
2 months 4 days ago

No roboto voice(

Pedro Varela
Guest
Pedro Varela
2 months 4 days ago

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

Seven I
Guest
Seven I
6 days 3 hours ago

hey, may explain why it is a pain in the layout?

pratham kesarkar
Guest
pratham kesarkar
2 months 3 days 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
2 months 4 days 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
2 months 4 days ago

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

Furkan Elci
Guest
Furkan Elci
2 months 5 days 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
2 months 5 days ago

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

saabzero
Guest
saabzero
2 months 4 days 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
2 months 4 days 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