Fix action tab bar in landscape mode
It was displaying as NAVIGATION_MODE_LIST
This commit is contained in:
parent
cfb0f98cd7
commit
2bd5151ffe
@ -65,13 +65,13 @@ public class CompatHoneycomb {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ActionBar ab = activity.getActionBar();
|
ActionBar ab = activity.getActionBar();
|
||||||
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
|
||||||
ab.removeAllTabs();
|
ab.removeAllTabs();
|
||||||
int[] order = activity.mPagerAdapter.mTabOrder;
|
int[] order = activity.mPagerAdapter.mTabOrder;
|
||||||
int[] titles = LibraryPagerAdapter.TITLES;
|
int[] titles = LibraryPagerAdapter.TITLES;
|
||||||
for (int i = 0, n = activity.mPagerAdapter.getCount(); i != n; ++i) {
|
for (int i = 0, n = activity.mPagerAdapter.getCount(); i != n; ++i) {
|
||||||
ab.addTab(ab.newTab().setText(titles[order[i]]).setTabListener(listener));
|
ab.addTab(ab.newTab().setText(titles[order[i]]).setTabListener(listener));
|
||||||
}
|
}
|
||||||
|
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user