IllegalStateException: The application’s PagerAdapter changed the adapter’s content without calling PagerAdapter#notifyDataSetChanged
I had a hard time making my ViewPager working. At the end, it seems that the example in the documentation is wrong. The addTab method should be as follows: public void addTab(Tab tab, Class<?> clss, Bundle args) { TabInfo info = new TabInfo(clss, args); tab.setTag(info); tab.setTabListener(this); mTabs.add(info); notifyDataSetChanged(); mActionBar.addTab(tab); } Notice the order of the … Read more