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

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.