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 Tabs from the Template

Masum Bergmann
PLUS
Masum Bergmann
Courses Plus Student 4,129 Points

To change or not to change...

At the beginning of the Video, there is a little notice that my code may be different, but that no change is needed and refers to the notes. In the notes it only say something about when using Android Studio, in which case change is needed.

Well, I'm not using Android Studio (yet!), but my code is still slightly different. My MainActivity extends Activity rather than FragmentActivity like in the video...

So... to change, or not to change? (and why? please)

1 Answer

Masum Bergmann
PLUS
Masum Bergmann
Courses Plus Student 4,129 Points

As it turns out, in the video Modifying Fragments from the Template I got an error ( return new InboxFragment();) and I DID have to tweak my code to get things working again. Fortunately though, the solution was already in the forums and can be found at: https://teamtreehouse.com/forum/android-studio-return-new-inboxfragment

Although this solution seems to address an Android Studio issue, the same issue occurs within Eclipse (I'm using Build: v22.6.2-1085508) as well.