android shared preferences does not commit in context code example
Example: refresh sharedpreferences going back java
getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);