How to read changes to shared values caused by "sub" activity from main activity?
When the main activity starts the "sub" activity and the "s开发者_开发知识库ub" activity makes changes to the shared values and is then destroyed (e.g. using the back option on a phone), is there a direct way of reading the changes at this stage?
On searching this matter I could only find references to using intent.putExtras and intent.getExtras plus using a bundle object. Are these the only way of handling the information ?
I tried to read the preferences from shared preferences straight after the activity was called thinking that when it finished this would be the next part it would do.
Reading the preferences in you onResume() for your main activity is the statergy I use. It gets them in on startup or after the preferenceActivity has changes, or after any other activity that may of changed them.
精彩评论