@Override public Fragment getItem(int position) { int count = getCount(); android.util.Log.d(TAG, "getting page: " + (count - position)); if (mIsDualPages) { return TabletFragment.newInstance( (count - position) * 2, mIsShowingTranslation ? TabletFragment.Mode.TRANSLATION : TabletFragment.Mode.ARABIC); } if (mIsShowingTranslation) { return TranslationFragment.newInstance(count - position); } else { return QuranPageFragment.newInstance(count - position); } }