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

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

Notify of
avatar

Mac Taylor
Guest
Mac Taylor
6 days 8 hours ago

Is constraint layouts better for if you are developing for multiple screen sizes? If not what is the best way to do it?

metin silsüpür
Guest
metin silsüpür
1 month 5 days ago

mycaps=?????????????

Nakul Singh
Guest
Nakul Singh
1 month 11 days ago

This sucks

Ash B
Guest
Ash B
1 month 14 days ago

Love it 🙂

jetliFAN
Guest
jetliFAN
1 month 19 days ago
I like constraint layout but it has MAJOR flaws. The biggest being it doesn't work if you're using softInputMode. If you're using an editText or you create a searchView, once that keyboard pops up, everything within that constraint layout moves. Buttons, labels, mapView. They all jump. This happens when you constrain the buttons/labels/mapViews down to the view. In Constraint Layout you can't not have something Constrained down to the view or else it'll look weird on different size devices.Is this a ConstraintLayout bug? RelativeLayout doesn't have this issue so I'm thinking of re-doing my XML files to RelativeLayout.Is there a… Read more »
jetliFAN
Guest
jetliFAN
1 month 19 days ago
I like constraint layout but it has MAJOR flaws. The biggest being it doesn't work if you're using softInputMode. If you're using an editText or you create a searchView, once that keyboard pops up, everything within that constraint layout moves. Buttons, labels, mapView. They all jump. This happens when you constrain the buttons/labels/mapViews down to the view. In Constraint Layout you can't not have something Constrained down to the view or else it'll look weird on different size devices.Is this a ConstraintLayout bug? RelativeLayout doesn't have this issue so I'm thinking of re-doing my XML files to RelativeLayout.Is there a… Read more »
Kris B
Guest
Kris B
2 months 1 day ago

Is it worth changing your layouts to this if the most you have is one nested layout?

Kris B
Guest
Kris B
2 months 1 day ago

Is it worth changing your layouts to this if the most you have is one nested layout?

Jiaqi Liu
Guest
Jiaqi Liu
2 months 15 days ago

I've been using constraint layout for a while in our project. For most cases, I must say it is the best layout and helps reduce most nested layout levels. On some low-end phones, the FPS of some layout animations increases from 20-30 to 50 or so due to far fewer nested view groups. Simply amazing!

jetliFAN
Guest
jetliFAN
1 month 19 days ago

If you say it's the best layout. I have an issue. I use constraint layout but from my experience it doesn't work with softInputMode. In my editText's and searchView, when keyboard appears, anything in the layout I have including buttons, imageView's, labels and even a mapView, they all jump up when keyboard pops up. It looks very strange. This doesn't happen in any other layout than constraintLayout. Do you know of a fix in constraintLayout that'd make everything in the layout stop jumping up when keyboard pops up?

Jiaqi Liu
Guest
Jiaqi Liu
2 months 16 days ago

I've been using constraint layout for a while in our project. For most cases, I must say it is the best layout and helps reduce most nested layout levels. On some low-end phones, the FPS of some layout animations increases from 20-30 to 50 or so due to far fewer nested view groups. Simply amazing!

jetliFAN
Guest
jetliFAN
1 month 19 days ago

If you say it's the best layout. I have an issue. I use constraint layout but from my experience it doesn't work with softInputMode. In my editText's and searchView, when keyboard appears, anything in the layout I have including buttons, imageView's, labels and even a mapView, they all jump up when keyboard pops up. It looks very strange. This doesn't happen in any other layout than constraintLayout. Do you know of a fix in constraintLayout that'd make everything in the layout stop jumping up when keyboard pops up?

1 2 3 8
wpDiscuz