title: error on calling getSupportFragmentManager() from activity
body: <p>I am trying to implement Swipe view using fragment.
  But its very <strong>important for me to extend simple activity rather than fragment activity</strong>.
  I am getting error on getSupportFragmentManager() in the code written below:</p>
  
  <pre><code>public class CollectionDemoActivity extends Activity {
  
  DemoCollectionPagerAdapter mDemoCollectionPagerAdapter;
  
  ViewPager mViewPager;
  
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_collection_demo);
  
  
      mDemoCollectionPagerAdapter = new DemoCollectionPagerAdapter(getSupportFragmentManager());
  
      mViewPager = (ViewPager) findViewById(R.id.pager);
      mViewPager.setAdapter(mDemoCollectionPagerAdapter);
  }
  
  public static class DemoCollectionPagerAdapter extends FragmentStatePagerAdapter {
  
      public DemoCollectionPagerAdapter(FragmentManager fm) {
          super(fm);
          //int x=10;
      }
  
      @Override
      public Fragment getItem(int i) {
          Fragment fragment = new DemoObjectFragment();
          Bundle args = new Bundle();
          args.putInt(DemoObjectFragment.ARG_OBJECT, i + 10); 
          fragment.setArguments(args);
          return fragment;
      }
  
      @Override
      public int getCount() {
          // For this contrived example, we have a 100-object collection.
          return 100;
      }
  
      @Override
      public CharSequence getPageTitle(int position) {
          return "OBJECT " + (position + 1);
      }
  }
  
  
  public static class DemoObjectFragment extends Fragment {
  
      public static final String ARG_OBJECT = "object";
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.fragment_collection_object, container, false);
          Bundle args = getArguments();
          ((TextView) rootView.findViewById(android.R.id.text1)).setText(
                  Integer.toString(args.getInt(ARG_OBJECT)));
          return rootView;
      }
  }
  }
  </code></pre>