Code example for FragmentPagerAdapter

Methods: notifyDataSetChanged

0
 
        public void addTab(ActionBar.Tab tab, Class<?> clss, Bundle args) {
            mTabs.add(clss.getName());
            mArgs.add(args);
            mActionBar.addTab(tab.setTabListener(this));
            notifyDataSetChanged(); 
        } 
 
        @Override 
        public int getCount() { 
            return mTabs.size();
        } 
 
        @Override 
        public Fragment getItem(int position) {
            return Fragment.instantiate(mContext, mTabs.get(position), mArgs.get(position));
        } 
 
        @Override 
        public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
        }