JakeWharton/Android-ViewPagerIndicator — pull request #249 by rrojas-chariot (2013-08-06 18:45:18+00:00)
Title: Fragment Tabs demonstrating BackStack issue.

This pull request includes sample code that demonstrates an issue when Navigation from a fragment containing TabPageIndicator (tabs) to another fragment and then tapping on the back button to navigate back to the fragment containing the TabPageIndicator. The issue is that some of the tabs (inner fragments) are not being refreshed and the displays an empty screen on some of the selected tabs.
Here are the steps to reproduce:
1- Run the attached code. It should display the "Tabs Fragment", the first fragment of the menu to the left.
2- Using the navigation menu (Navigation Drawer) by tapping on the Droid Icon top left, select any of the other item, "Mercury" for example.
3- Once the new fragment is loaded, tap on the device back button.
4- It should redisplay the "Tabs Fragment", but this time some of the tab items will not display the corresponding inner fragment content.

I used the "Navigation Drawer" (http://developer.android.com/training/implementing-navigation/nav-drawer.html) sample since that's a very similar scenario we use in our application.

Let me know if you need any additional information.

The files classes with most importance of this code are:
sample/src/com/viewpagerindicator/sample/NavigationDrawerActivity.java
sample/src/com/viewpagerindicator/sample/SampleTabsDefaultFragment.java

The following are supporting files for the Navigation Drawer:

sample/res/drawable/earth.jpg
sample/res/drawable/ic_drawer.png
sample/res/drawable/jupiter.jpg
sample/res/drawable/mars.jpg
sample/res/drawable/mercury.jpg
sample/res/drawable/neptune.jpg
sample/res/drawable/saturn.jpg
sample/res/drawable/uranus.jpg
sample/res/drawable/venus.jpg
sample/res/layout/drawer_list_item.xml
sample/res/layout/fragment_planet.xml
sample/res/layout/navigation_drawer.xml
sample/res/menu/main.xml
sample/res/values/strings.xml
sample/res/values/styles.xml