Android Preferences: Saving In Activity Or Preferenceactivity
I have an Activity which when clicking the menu and a button appearing there, goes to a PreferenceActivity, and then loads three ListPreferences. The ListPreference lets the user c
Solution 1:
Your asking is not very clear because the answers are already in the question...
Solution 2:
It seems like it shouldn't matter where you write and read those values if they're within sharedPrefs. However if you're having trouble with it why not just call PreferenceActivity with startActivityForResult() in your main Activity, and within onPause() in your PreferenceActivity simply pass the information into a bundle/intent with intent.putExtras() and send it back to your main Activity with setResult(), finish()? Then do whatever you want with them in your main Activity by pulling the data with intent.getExtras()? Sorry if I missed exactly what you were asking but it's not very clear.
Post a Comment for "Android Preferences: Saving In Activity Or Preferenceactivity"