Code example for FragmentStatePagerAdapter

Methods: notifyDataSetChanged

0
        return mSmoothScroll;
    } 
 
    private void notifyChanged() { 
        if (mAdapter != null) {
            mAdapter.notifyDataSetChanged();
        } 
    } 
 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(mCustomLayout > 0 ? mCustomLayout : R.layout.tab_swipe);
        mViewPager = (ViewPager) findViewById(R.id.tabSwipePager);
        if (mViewPager == null) {
            throw new IllegalStateException(
                    "Add ViewPager to your custom layout with id @id/tabSwipePager"); 
        } 
        mAdapter = new TabSwipeAdapter();
        onHandleTabs(); 
        mViewPager.setAdapter(mAdapter);