Android Studio 2.2 Constraint Layout Buttons not visible
Asked Answered
R

4

5

Recently I was going through the tutorials of constraint layout (new in Android Studio 2.2). In the tutorials they had buttons used for constraints layout on the bar but there are no buttons in my Android Studio. See image below:

enter image description here

Ronald answered 22/9, 2016 at 4:3 Comment(2)
try playing with the view menu in the menu bar of AS. you don't need to ask these questions hereRestivo
I had the same issue and am glad to find this question. There seems to be little that is useful in the view menu for revealing the constraints.Phyllida
N
10

Add below-given dependencies in build.gradle(app)

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta5'

}

Please do as shown below in your layout enter image description here

Then after refreshing the project, click on the layout and all buttons will remain visible for yourself to work upon constraints.

Nosing answered 22/9, 2016 at 5:8 Comment(1)
you can learn more about new constraints from https://www.youtube.com/watch?v=z53Ed0ddxgMere ... it was very helpfull for meNosing
P
0

I also had an issue finding the constraints button while following the official tutorials. Being a n00b, I didn't realize that constraints was a layout in itself (the tutorial skips over that) and since I started with a different activity better aligned to my purposes, it used a ContainerLayout instead of a ConstraintLayout.

In my case, ConstraintLayout is already available, so the previous answer doesn't really provide the proper solution.

So, some basic options to make the tutorial go as expected are:

  • (A) Start over and follow the tutorial as specified.
  • (B) Convert the ContainerLayout to a ConstraintLayout by right-clicking on Container in the ComponentTree. You may have to fuss around with it after conversion to get it to align to the tutorial.
  • (C) Create a new activity that matches the tutorial (e.g. 'Empty Activity') and it will use the ConstraintLayout. Use that activity to follow the tutorial.

Simple, yes, but not necessarily obvious to the n00bs. Hope it helps.

Phyllida answered 14/6, 2017 at 22:1 Comment(0)
J
0

I think I found the button! I somehow found the menu item first (thanks to Reddit), and am wondering how I could have possibly missed the button, since I looked quite a bit at the row directly above it, but, there it is.

enter image description here

Jervis answered 18/9, 2017 at 19:32 Comment(0)
R
0

In my case when I put the constraintlayout inside scrollview all the constraint layout buttons disappeared . I got them back when I restored the constraintlayout as the root container.

Recondite answered 18/10, 2019 at 14:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.