title: Android- deprecated method warning regarding PreferenceActivity
body: <p>When I attempt to follow Android's Developer guides and tutorials for creating a Settings Activity using Preferences, I receive warnings such as:</p>
  
  <p>"The method addPreferencesFromResource(int) from the type PreferenceActivity is deprecated"</p>
  
  <p>for both of these lines in the code:</p>
  
  <pre><code>getPreferenceManager().setSharedPreferencesName(PREFS_NAME);
  addPreferencesFromResource(R.xml.default_values);
  </code></pre>
  
  <p>I know these are just warnings, but I was wondering if they will cause any issues, now or in the future, when I am running the application that I am designing.</p>
  
  <pre><code>public class DefaultValues extends PreferenceActivity {
  
      static final String PREFS_NAME = "defaults";
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          getPrefs(this);
          getPreferenceManager().setSharedPreferencesName(PREFS_NAME);
          addPreferencesFromResource(R.xml.default_values);
      }
  
      static SharedPreferences getPrefs(Context context) {
          PreferenceManager.setDefaultValues(context, PREFS_NAME, MODE_PRIVATE,
                  R.xml.default_values, false);
          return context.getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
      }
  }
  </code></pre>