I\'ve looked at quite a lot of code and can\'t figure this out. http://developer.android.com/reference/android/support/v4/app/FragmentPagerAdapter.html
It has to be som
I think you will have to typecast to fragment before returning. So try this
Fragment history = HistoryFragment.newInstance(i); return history;