title: can i seperate java class files for each pages in viewpager of tab view
body: <p>I have imported the tabbed activity from android studio.
  Under static placeholder fragment i have oncreate view and i have switched cases for each tab and given a seperate layout for each. I want to work in separate java class for each page in tab view. Can i seperate each cases to be in seperate class?</p>
  
  <pre><code>public static class PlaceholderFragment extends Fragment {
          /**
           * The fragment argument representing the section number for this
           * fragment.
           */
          private static final String ARG_SECTION_NUMBER = "section_number";
  
          public PlaceholderFragment() {
          }
  
          /**
           * Returns a new instance of this fragment for the given section
           * number.
           */
          public static PlaceholderFragment newInstance(int sectionNumber) {
              PlaceholderFragment fragment = new PlaceholderFragment();
              Bundle args = new Bundle();
              args.putInt(ARG_SECTION_NUMBER, sectionNumber);
              fragment.setArguments(args);
              return fragment;
          }
  
          @Override
          public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                   Bundle savedInstanceState) {
           int tabNumber= getArguments().getInt(ARG_SECTION_NUMBER);
            switch (tabNumber)  {
              case 1: {
  
                  View rootView = inflater.inflate(R.layout.tab1, container, false);
  
  
                  return rootView;
              }
                case 2: {
  
                    View rootView = inflater.inflate(R.layout.tab2, container, false);
  
  
  
                    return rootView;
                }
                case 3: {
  
                    View rootView = inflater.inflate(R.layout.tab3, container, false);
  
  
  
  
                    return rootView;
                }
  </code></pre>