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 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.