title: ARG_SECTION_NUMBER cannot be resolved
body: <p>I'm currently trying to create 3 different tabs with 3 different fragments for the purpose of having different content for each tab. I'm stuck with some error in my code that says : </p>
  
  <blockquote>
    <p>ARG_SECTION_NUMBER cannot be resolved</p>
  </blockquote>
  
  <pre><code>public class SampleFragmentPagerAdapter extends FragmentPagerAdapter {
  final int PAGE_COUNT = 3;
  
  private String tabTitles[] = new String[] { "Featured", "Browse", "Following" };
  
  private Context context;
  
  public SampleFragmentPagerAdapter(FragmentManager fm, Context context) {
      super(fm);
      this.context = context;
  }
  
  @Override
  public int getCount() {
      return PAGE_COUNT;
  }
  
  @Override
  public Fragment getItem(int position) {
      //(original coding) return PageFragment.newInstance(position + 1);
  
      //getItem is called to instantiate the fragment for the given page.
      // Return a DummySectionFragment (defined as a static inner class
      // below) with the page number as its lone argument.
      switch (position) {
          case 0:
              Fragment fragment = new DummySectionFragment();
              Bundle args = new Bundle();
              args.putInt(fragment.ARG_SECTION_NUMBER, position + 1);
              fragment.setArguments(args);
              return fragment;
  
          case 1:
              Fragment fragment2 = new DummySectionFragment2();
              Bundle args2 = new Bundle();
              //args2.putInt(fragment2.ARG_SECTION_NUMBER, position + 2);
              fragment2.setArguments(args2);
              return fragment2;
  
          case 2:
  
              Fragment fragment3 = new DummySectionFragment3();
              Bundle args3 = new Bundle();
              //args3.putInt(fragment3.ARG_SECTION_NUMBER, position + 3);
              fragment3.setArguments(args3);
              return fragment3;
  
  
          default:
              return null;
      }
  
  }
  
  @Override
  public CharSequence getPageTitle(int position) {
      // Generate title based on item position
      //(original coding) return tabTitles[position];
  
      Locale l = Locale.getDefault();
      switch (position) {
          case 0:
              return App.getContext().getString(R.string.title_section1).toUpperCase(l);
          case 1:
              return App.getContext().getString(R.string.title_section2).toUpperCase(l);
          case 2:
              return App.getContext().getString(R.string.title_section3).toUpperCase(l);
      }
      return null;
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Anyone have any idea why ARGS_SECTION_NUMBER cannot be resolved for</p>
  
  <ul>
  <li>fragment.ARG_SECTION_NUMBER</li>
  <li>fragment2.ARG_SECTION_NUMBER</li>
  <li>fragment3.ARG_SECTION_NUMBER</li>
  </ul>
  
  <p>The DummySectionFragment.java is as follows:</p>
  
  <pre><code>public class DummySectionFragment extends Fragment {
  /**
   * The fragment argument representing the section number for this
   * fragment.
   */
  public static final String ARG_SECTION_NUMBER = "section_number_1";
  public DummySectionFragment() {
  
  }
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      View rootView = inflater.inflate(R.layout.fragment_main, container, false);
      TextView dummyTextView = (TextView) rootView.findViewById(R.id.section_label);
      dummyTextView.setText(Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER)));
      return rootView;
  }
  </code></pre>
  
  <p>}</p>