Android ActionBar: show/hide tabs dynamically?
问题 Is it possible to remove/restore the tab bar from the action bar dynamically? Up to now I did this by changing the navigation mode of the action bar. I used following code to remove and restore the tab bar: @Override public void restoreTabs() { getSupportActionBar() .setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); this.supportInvalidateOptionsMenu(); } @Override public void removeTabs() { getSupportActionBar() .setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); this