Code example for TabHost

Methods: clearAllTabssetCurrentTab

0
	/** 
	 * 清空Tabs 
	 */ 
	public void clear(){ 
		mTabs.clear();
		mTabHost.setCurrentTab(0);
		mTabHost.clearAllTabs();
		notifyDataSetChanged(); 
	} 
 
    @Override 
    public int getCount() { 
        return mTabs.size();
    } 
 
    @Override 
    public Fragment getItem(int position) {
        TabInfo info = mTabs.get(position);
        return Fragment.instantiate(mContext, info.clss.getName(), info.args);
    }