I have a settings screen that has some prefs that are related. This means that if I have pref x and y , I sometimes need y to change something when x changes.
What I'm doing at the moment is listening to the prefix change event, and do the following:
SharedPreferences.Editor editor = prefs.edit(); editor.putString("y_pref", "somevalue"); editor.commit();
The problem is that in order to actually view the change, I must first close the prefs screen and then open it again, only this way I will see the newly installed prefs.
Is there a way to change the prefix so that the changes are visible immediately, without having to reload the prefs screen?
Meight
source share