Code example for TabHost.TabSpec

Methods: getTag, setContent

0
            mViewPager.setAdapter(this);
            mViewPager.setOnPageChangeListener(this);
        } 
 
        public void addTab(TabHost.TabSpec tabSpec, Class<?> clss, Bundle args) {
            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) {