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

Tabs issue in Ribbit App

In my project I am having problems with switching between the inbox and you friends list. If you click on the tab itself it shows the tab as switching but not the fragment. When you swipe on the other hand it shows both the tab and fragment update.

2 Answers

I have found the solution for those of you who have the same problem. I think this may be due to the fact that recently there has been updates to how Android handles fragments. Inside of the onTabSelect Method in the MainActivity eclipse did not generate the code listen for taps on the tabs. So after adding mViewPager.setCurrentItem(tab.getPosition()); to the method everything worked! :)

Glad you got it sorted out. I didn't run into that problem with the recent updates using Android Studio