Code example for ActionBar.Tab

Methods: getText

0
      if (fragment == null) {
        String fragmentName = fragmentClass.getName();
        fragment =
          (MyFragment)Fragment.instantiate(activity, fragmentName);
        ft.add(fragmentContainer, fragment, null);
        fragment.setFragmentText(tab.getText());
      } else { 
        ft.attach(fragment);
      } 
    } 
 
    // Called on the currently selected tab when a different tag is 
    // selected.  
    public void onTabUnselected(Tab tab, FragmentTransaction ft) {
      if (fragment != null) {
        ft.detach(fragment);
      } 
    }  
 
    // Called when the selected tab is selected. 
    public void onTabReselected(Tab tab, FragmentTransaction ft) {