Example #1
0
    @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).

      switch (position) {
        case 0:
          return LeftFragment.newInstance(position);
        case 1:
          return CenterFragment.newInstance(position);
        case 2:
          return RightFragment.newInstance(position);
        default:
          return null;
      }
    }