Code example for TabHost

Methods: clearAllTabs

0
      public boolean onKeyDown(int keyCode, KeyEvent event) {
        switch (keyCode) {
        case KeyEvent.KEYCODE_BACK:
          /* perform cleanup */ 
          myMainActivity.mytabHost = getTabHost();
          myMainActivity.mytabHost.clearAllTabs();
 
          /* call System.gc */ 
          System.gc();
          myMainActivity.this.finish();
          return true; 
        default: 
          return false; 
        } 
      }// end onKeyDown 
    }// end myMainActivity