Code example for TabHost

Methods: setup

0
  protected void onInitialize(final Bundle savedInstanceState) {
    super.onInitialize(savedInstanceState);
    setContentView(getLayoutId()); 
 
    tabHost = (TabHost)findViewById(android.R.id.tabhost);
    tabHost.setup();
 
    tabManager = createTabManager(tabHost, getFragmentsContainer());
  } 
 
  protected TabManager createTabManager(final TabHost host, final int containerId) {
    return new TabManager(this, host, containerId);
  } 
 
  @Override 
  protected void onSaveInstanceState(final Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putString(SAVE_TAB, tabHost.getCurrentTabTag());
  } 
 
  @Override