Code example for TabHost

Methods: addTab

0
            tabSpec.setContent(new DummyTabFactory(mContext));
            String tag = tabSpec.getTag();
 
            TabInfo info = new TabInfo(tag, clss, args);
            mTabs.add(info);
            mTabHost.addTab(tabSpec);
            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);
        } 
 
        @Override