Kieran wrote: > Hi, > I think I've missed something in how Android is supposed to work! > I have the main Activity with a menu option that opens the preferences > screen. What I need is a way for any changes that were made to be > communicated back to the main Activity as soon as the preference is > activated. At the moment the only way I could get it working is by > using the intent data that gets sent back when the prefs activity > closes but this isn't really enough. The reason why it needs to be > instantaneous is that one of the preferences is a 'Clear cache' > button, so I would like the data to be deleted when the user requests > it and no later!
Attach a preference listener: http://developer.android.com/reference/android/content/SharedPreferences.html#registerOnSharedPreferenceChangeListener(android.content.SharedPreferences.OnSharedPreferenceChangeListener) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.8 Available! -- 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

