Code example for FragmentStatePagerAdapter

Methods: dispatchTabSelected

0
            // Do nothing 
        } 
 
        @Override 
        public void onTabSelected(Tab tab, FragmentTransaction ft) {
            dispatchTabSelected(tab.getPosition());
        } 
 
        @Override 
        public void onTabUnselected(Tab tab, FragmentTransaction ft) {
            // Do nothing 
        } 
    } 
 
    private TabSwipeAdapter mAdapter;
    private int mCustomLayout = -1;
    private boolean mSmoothScroll = true;
    private List<TabInfo> mTabs = new ArrayList<TabInfo>();
    private ViewPager mViewPager;
 
    public TabInfo addTab(CharSequence title, Class<? extends Fragment> fragmentClass) {