Few tips I currently use :
If you want to clear all settings easiliy:
getSharedPreferences("...", MODE_PRIVATE).edit().clear().commit();
This method works well when:
* you don't have invisible settings, or you want them to be cleared
too.
* you have specified default values correctly in the xml file
describing the preferences.If you want to restart your activity with a single line of code, with the same extras as before: startActivity(getIntent()); //provided you didn't modify the original intent of course On 5 oct, 06:39, Amos <[EMAIL PROTECTED]> wrote: > I've implemented something similar and will leave it like this for > now. My "resetpreferences" option is currently not in the main > activity screen, but I'll move it there so it'll behave reasonably. > > Guess this is an example of the limitations of working with a > framework rather than rolling your own code. I'm still very happy with > thepreferencesframework, though - it's consistent, works well and > saves a lot of time and hassle. > > Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

