Johan Paul
Johan Paul

Reputation: 2456

Blueprint view nor the constraints are now visible in Android Studio design view

I had to edit the Constraint Layout XML file by hand (*), so I also removed all the tools: fields from the XML. To my understanding these attributes are only used by Android Studio and the Constraint Layout tool. But I removed them because I wanted to reset the state of the layout and changing the android: properties for the Constraint Layout surely would only mix things up even more, right?

So I am now in a situation where the blueprint view stays empty and the hierarchy view says "Nothing to show". I see no view properties and no constraints. I can only see the flat UI design view of the layout, but I can't select any elements from it either.

Any ideas how to fix this?

I am running Android Studio 2.2.3 and Constraint Layout beta 4.

*) Why did I edit the layout by hand you ask? Well, I selected "Convert to Constraint Layout" in which case Android Studio just flattened my layout and hard coded the positions of all elements. Which wasn't exactly what I wanted since then I couldn't change the positions anymore. Removing the hard coded positions (and the tools: arguments) let me re-structure my layout.

Upvotes: 2

Views: 4024

Answers (1)

Johan Paul
Johan Paul

Reputation: 2456

Ok, I am going to answer this myself since I got it working thanks to Nicolas Roard who works on the Constraint Layout team at Google.

try pressing "r" [in the design view]

https://twitter.com/camaelon/status/809427379500126208

I wasn't aware of the keyboard shortcut "r" in this case, but it did solve it for me!

Upvotes: 4

Related Questions