private void initializeFragmentSwitcher ( ) { mFragmentSwitcher = ( FragmentSwitcher ) findViewById ( R . id . fragment_switcher ) ; mFragmentAdapter = new FragmentStateArrayPagerAdapter ( getSupportFragmentManager ( ) ) ; mFragmentSwitcher . setAdapter ( mFragmentAdapter ) ; }
Initializes the fragment switcher . It works just like a viewpager .