title: Android ViewPager FragmentManager cannot be applied error
body: <p>I'm using pager view in the regular way. in the code below I get the error: <code>android.support.v4.app.FragmentManager cannot be applied to android.app.FragmentManager</code>. I checked all the solutions for this and implemented them as it can be seen (the import's seems OK), and still I have this error...    </p>
  
  <pre><code>import android.support.v4.app.Fragment;
  import android.support.v4.app.FragmentActivity;
  import android.support.v4.app.FragmentManager;
  import android.support.v4.app.FragmentStatePagerAdapter;
  import android.support.v4.view.PagerAdapter;
  import android.support.v4.view.ViewPager;
  
  public class MyActivity extends FragmentActivity {
  
      private static int NUM_PAGES = 0;  //The number of pages to show.
      private static ViewPager mPager;  //The pager widget
      private static PagerAdapter mPagerAdapter;  //The pager adapter
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_my);
          mPager = (ViewPager) findViewById(R.id.pager);
          //Next line is error
          mPagerAdapter = new ScreenSlidePagerAdapter(getFragmentManager());
          mPager.setAdapter(mPagerAdapter);
      }
  
      /**
       * A simple pager adapter
       */
      private class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter {
          public ScreenSlidePagerAdapter(FragmentManager fm) {
              super(fm);
          }
  
          @Override
          public Fragment getItem(int position) {
              return MyFragment.create(position);
          }
  
          @Override
          public int getCount() {
              return NUM_PAGES;
          }
      }
      ...
  }
  </code></pre>