I need to temporarily hide the Tab
objects I've defined for my ActionBar
. There is no setVisibility
method on Tab
objects, so I'm at a loss as to how to accomplish this.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I'd try setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD)
, to move back to the non-tab rendition. It's possible that, when you later call setNavigationMode(ActionBar.NAVIGATION_MODE_TABS)
that you will need to re-establish your tabs, though.
UPDATE: Note that action bar tabs are deprecated in the "L" Developer Preview and should remain deprecated in future production Android releases. Consider using something else for tabs: ViewPager
with a tabbed indicator, FragmentTabHost
, etc.