views:

24

answers:

1

Hi,

I've just created some preferences using the PreferenceScreen XML following the Earthquake example from Wrox's "Professional Android Development" book.

Using the emulator, how do I accept the preferences? If I use the back button I return a Activity.RESULT_CANCELED. So which key returns the Activity.RESULT_OK code?

Thanks.

+1  A: 

if you are using PreferenceActivity, preference changes are persisted as soon as they are made

additional information

http://developer.android.com/reference/android/app/Activity.html#SavingPersistentState

Aaron Saunders
Thanks, Aaron. My preferences - which had been started from a startActivityForResult - was checking for Activity.RESULT_OK on its return. I've taken this check out and it works fine.
jFort