title: The return type is incompatible with FragmentPagerAdapter.getItem(int)
body: <p>I am following the tutorial here: <a href="http://www.javacodegeeks.com/2013/04/android-tutorial-using-the-viewpager.html" rel="nofollow">http://www.javacodegeeks.com/2013/04/android-tutorial-using-the-viewpager.html</a>
  I get this error in the "Problems": The return type is incompatible with FragmentPagerAdapter.getItem(int)
  Here is MyPageAdapter.java:</p>
  
  <pre><code>package com.example.loginandregistration;
  
  import java.util.List;
  
  import android.app.Fragment;
  import android.support.v4.app.FragmentManager;
  import android.support.v4.app.FragmentPagerAdapter;
  
  
  public class MyPageAdapter extends FragmentPagerAdapter { 
  
  private List&lt;Fragment&gt; fragments; 
  
  public MyPageAdapter(FragmentManager fm, List&lt;Fragment&gt; fragments) { 
  
  super(fm); 
  
  this.fragments = fragments; 
  
  } 
  
  
   @Override
  
   public Fragment getItem(int position) {
   return this.fragments.get(position);
   }
  
   @Override 
  
  public int getCount() { 
  
  return this.fragments.size(); 
    } 
     } 
  </code></pre>
  
  <p>The error is on line 25: </p>
  
  <pre><code>public Fragment getItem(int position) {
  </code></pre>
  
  <p>When I open up for the quick fix it gives me the one option to "Change return type of 'getItem(...)' to 'Fragment' but if I do that it gives me an error on the next line and is a continuous loop of those errors going back and forth. </p>
  
  <p>Any help on fixing this really quick is apperciated! Thanks in advance!</p>