Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Weather App (2015) Working with JSON Setting the Weather Icon

Kathleen Roberson
Kathleen Roberson
2,706 Points

I can't drag widgets onto the phone mockup. Component Tree shows "customview" instead of the Relative View. Help!

I'm in the weather app, trying to set up UI. I'm in activity_main, with the Palette in Design View. My setup looks the same as the video, except the component tree. I've searched the developer site, but it also shows the Relative Layout view, unlike mine.

Hope you can help1

3 Answers

Try using content_main.xml instead. In newer version of Android Studio, they created 2 files for each activity layout, an activity_main file that includes the other view, which is the content_main.xml

To follow the tutorial easily, I suggest copy the content of content_main.xml into activity_main.xml

Kathleen Roberson
Kathleen Roberson
2,706 Points

Thank you! I greatly appreciate your help

You can also change the class to RelativeLayout when you are pressing on the CustomView worked for me :)