title: Android app : show PreferenceFragment as a dialog?
body: <p>I'm new to Android (with iOS background) and I would like to do the following : 
  I've made a PreferenceFragment in which I ask the user his credentials to connect to my WebServices. When I detect that those credentials are rejected by my server, I would like to show to my user a dialog (modal) where he can edit his preferences (credentials).</p>
  
  <p>I've manage to do it using PreferenceActivity. So when I click a bouton, I execute the following code :</p>
  
  <pre><code>Intent settingsActivity = new Intent(getActivity().getBaseContext(), PreferencesConnection.class);
  startActivity(settingsActivity);
  </code></pre>
  
  <p>Which load a PreferenceActivity as a Dialog with an XML ressource :</p>
  
  <pre><code>addPreferencesFromResource(R.xml.preferences_connection);
  </code></pre>
  
  <p>But this is depreciated. I can I do the same, but with Fragment? Should I use DialogFragment to show my PreferenceFragment, or not? Would it be easier to just rebuilt my credentials in a DialogFragment? Should I use a Activity instead of Fragment?</p>