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! While you're at it, check out some resources Treehouse students have shared here.

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 an Interactive Story App (Retired) User Input Introducing ImageViews

Content_main.xml and Activity_main.xml. Which one should I be using. Activity main is unresponsive. Content main is not.

The video doesn't have content_main.xml, but that is the one that I can interact with. I cannot interact with activity_main.xml, however that is the one the video is telling me to do things with. I don't want to start off a new project working with the wrong activity.

2 Answers

Seth Kroger
Seth Kroger
56,413 Points

It's one of the changes made to Android Studio since the video was made. The starting template for a "blank activity" gives you two layout files now, instead of one. The activity_main.xml is the "outer" part of the activity layout (toolbar, action button, etc.) and content_main.xml is the inner part where you put your own layout (the blank space). So you should usually be working with content_main.xml where Ben is woking with activity_main.xml in this lesson.

Thank your for such a quick replay. I will work with content_main.xml. Once again, thanks for the help I thought I might have to wait a day or two to get an answer.