This tutorial is good for setting up. In addition, if you want to change the settings outside PreferenceActivity, you must use the editor For example:
Editor e = PreferenceManager.getDefaultSharedPreferences(getBaseContext()).edit();
e.putString("yourPreference", "default value");
e.commit();
I hope this helps
In addition, as shown in the documentation here , it is PreferenceActivityused to display a visual style of settings. In addition, as indicated in the same link, "settings are automatically saved until SharedPreferenceswhen the user interacts with them."
, , , , TextView EditText PreferenceActivity, PreferenceActivity.
, .