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 Build a Self-Destructing Message Android App Using Fragments for Tabs Modifying Fragments from the Template

Rodrigo Rocha
Rodrigo Rocha
4,042 Points

The things are different here

The code in public Fragment getItem(int position) method does not contains the same code shown in this video. This code is in another class called PlaceholderFragment. I don't know how to send a InboxFragment object to getItem() method in the SectionsPageAdapter.

Ben Jakuben can you help me to solve this?

3 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Sorry about the differences! As I mentioned in your other post, I'll be refreshing this course before too long. But in the mean time, check out the Teacher's Notes for help on getting past the issue.

Rodrigo Rocha
Rodrigo Rocha
4,042 Points

Hi Ben, I solved this problem. See the answer I wrote in the forum:

Error on return new InboxFragment();

But I don't know how to solve this using the libraries v13 and v7.

Thanks!

Ben Jakuben
Ben Jakuben
Treehouse Teacher

I remember dealing with that before, but I don't quite remember the details. You may need to go into your libs directory and delete one of the versions from your project.

Rodrigo Rocha
Rodrigo Rocha
4,042 Points

Thanks Ben, but this is not a problem now. I'll continue browsing this sea called android.