title: Error:(25, 94) error: incompatible types: SettingsFragment cannot be converted to Fragment
body: <pre><code>import android.os.Bundle;
  import android.preference.PreferenceFragment;
  import android.support.v4.app.FragmentManager;
  import android.support.v4.app.FragmentTransaction;
  import android.support.v7.app.AppCompatActivity;
  
  import static android.R.attr.fragment;
  
  public class AppPreferences extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_note_detail);
  
          FragmentManager fragmentManager = getSupportFragmentManager();
          FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
  
          SettingsFragment settingsFragment = new SettingsFragment();
         // fragmentTransaction.add(android.R.id.content, settingsFragment, "SETTING_FRAGMENT");
  </code></pre>
  
  <p>the error starting here is settingsFragment and the error is Error:(25, 94) error: incompatible types: SettingsFragment cannot be converted to Fragment</p>
  
  <pre><code>FragmentTransaction setting_fragment = fragmentTransaction.add(android.R.id.content, settingsFragment, "SETTING_FRAGMENT");
  setting_fragment.commit();
  </code></pre>
  
  <p>and this is my settingsFragment</p>
  
  <pre><code>public  static class SettingsFragment extends PreferenceFragment{
  
      @Override
      public void onCreate(Bundle savedInstanceState){
          super.onCreate(savedInstanceState);
  
          addPreferencesFromResource(R.xml.app_preferences);
      }
  }
  </code></pre>