Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android

Timothy Boland
Timothy Boland
18,237 Points

Android | Ribbit | Extra Credit: Multiple Tabs in One Activity

"As we have seen, Fragments can be used to display different views in one activity. Create a new project and see if you can display two or more fragments in one Activity."

Im not sure i understand the Extra Credit....Arent we doing this already, with this project....WIth the InboxFragment and FriendsFragment in the MainActivity? Or am i not understanding?

1 Answer

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

The intent is to have two fragments displaying at one time on the same screen. Sorry that wasn't more clear! I'll try to clarify the instructions. Let us know with a new post if you have any follow-up questions. It's an open-ended challenge, but the idea is to modify your Activity's layout and class file to allow for two or more Fragments at once.

You can check out the tablet views in the Master Detail template project for one example, but there are of course multiple ways to do it.