Code example for ActionBar

Methods: getTabCount

0
         
    } 
     
    public void onAddTab(View v) {
        final ActionBar bar = mActivity.getActionBar();
        final int tabCount = bar.getTabCount();
        final String text = "Tab " + tabCount;
 //       bar.addTab(bar.newTab() 
 //               .setText(text) 
 //               .setTabListener(new TabListener(new TabFragment4(text)))); 
    } 
 
    public void onRemoveTab(View v) {
        final ActionBar bar = mActivity.getActionBar();
        bar.removeTabAt(bar.getTabCount() - 1);
    } 
 
    public void onToggleTabs(View v) {
        final ActionBar bar = mActivity.getActionBar();
 
        if (bar.getNavigationMode() == ActionBar.NAVIGATION_MODE_TABS) {