title: Can't get the PreferenceFragment to work (Compiling error)
body: <p><img src="https://i.stack.imgur.com/HKDOC.jpg" alt="enter image description here"></p>
  
  <p>I am getting error when i try to compile my project: "The method add(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, FragmentPreferences)". As far as i know, the PreferenceFragment is a Fragment? I am developing for android 4.0 but i have to use android-support-v4 library because my project incluedes also ViewPager. I found this example at <a href="http://developer.android.com/guide/topics/ui/settings.html#Fragment" rel="nofollow noreferrer">http://developer.android.com/guide/topics/ui/settings.html#Fragment</a>:</p>
  
  <pre><code>// Display the fragment as the main content.
          getFragmentManager().beginTransaction()
                  .replace(android.R.id.content, new SettingsFragment())
                  .commit();
  </code></pre>
  
  <p>But i can't get it to work.</p>
  
  <p>My code: </p>
  
  <pre><code>case R.id.menu_settings:
      FragmentPreferences prefs = new FragmentPreferences();
      FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
      ft.add(android.R.id.content, prefs);
      ft.commit();
      break;
  </code></pre>
  
  <p>FragmentPreferences:</p>
  
  <pre><code>public class FragmentPreferences extends PreferenceFragment {
      @Override
      public void onCreate(Bundle savedInstanceState){
          super.onCreate(savedInstanceState);
          addPreferencesFromResource(R.xml.preferences);
      }
  
  }
  </code></pre>