Reputation: 543
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:
Upvotes: 5
Views: 14210
Reputation: 313
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.
Upvotes: 0
Reputation: 14053
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
Then after refreshing the project, click on the layout and all buttons will remain visible for yourself to work upon constraints.
Upvotes: 10
Reputation: 377
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.
Upvotes: 0
Reputation: 1826
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:
Simple, yes, but not necessarily obvious to the n00bs. Hope it helps.
Upvotes: 0