Enable/Disable Tab in ActionBar
问题 It's possible to enable/disable Tabs in ActionBar? With TabHost this is not a problem.. I do: tabHost.getTabWidget().getChildAt(3).setVisibility(true); and all works.. but if i want to do the same thing with Tabs in ActionBar?? In Tab class don't exist setEnable(); ActionBar bar = getActionBar(); Tab tab = bar.newTab(); tab.setText("Test"); tab.setEnable(false); /*DON'T EXIST!!*/ How can I do?? 回答1: You could use the removeTab( ActionBar.Tab tab )-method of ActionBar : bar.removeTab( tab );