content: package ak.sh.ay.app.adapters;
  
  import androidx.fragment.app.Fragment;
  import androidx.fragment.app.FragmentManager;
  import androidx.fragment.app.FragmentPagerAdapter;
  
  import ak.sh.ay.app.PlaceholderFragment;
  
  /**
   * Created by akshay on 14/9/17.
   */
  
  public class SectionsPagerAdapter extends FragmentPagerAdapter {
  
      public SectionsPagerAdapter(FragmentManager fm) {
          super(fm);
      }
  
      @Override
      public Fragment getItem(int position) {
          // getItem is called to instantiate the fragment for the given page.
          // Return a PlaceholderFragment (defined as a static inner class below).
          return PlaceholderFragment.newInstance(position + 1);
      }
  
      @Override
      public int getCount() {
          // Show 3 total pages.
          return 5;
      }
  
      @Override
      public CharSequence getPageTitle(int position) {
          switch (position) {
              case 0:
                  return "SECTION 1";
              case 1:
                  return "SECTION 2";
              case 2:
                  return "SECTION 3";
              case 3:
                  return "SECTION 4";
              case 4:
                  return "SECTION 5";
          }
          return null;
      }
  }
  