use of org.wikipedia.page.tabs.Tab in project apps-android-wikipedia by wikimedia.
the class PageFragment method setCurrentTab.
private void setCurrentTab(int position, boolean updatePrevBackStackItem) {
// (but only if it's a different tab than the one currently in view!
if (position < tabList.size() - 1) {
Tab tab = tabList.remove(position);
tabList.add(tab);
tabsProvider.invalidate();
if (updatePrevBackStackItem) {
pageFragmentLoadState.updateCurrentBackStackItem();
}
pageFragmentLoadState.setBackStack(tab.getBackStack());
pageFragmentLoadState.loadFromBackStack();
}
}
Aggregations