Android Question Create Preference Screen List

Tim5000

Member
Licensed User
Longtime User
Hello...

I have created a simple Settings screen according to the PreferenceActivity info on this site. The screen has just one category where the user can select a color (Red, Green, Amber) by using the radio buttons in the list. My question is... If I want to do something when a user selects a different color from the list, I need a way to know when that event happens. There is no click event in a Preference screen list.

The reason I need this is to update the list item summary with the current color selection (see line 3755) this works but it is not updated until the program is restarted. So I basically need a way to call CreatePreferencesScreen when the list is changed or closed.

Thanks!
 

Attachments

  • Capture.JPG
    Capture.JPG
    68.6 KB · Views: 165
Last edited:

Tim5000

Member
Licensed User
Longtime User
You should handle the changes in Activity_Resume. It will be called when the preference screen is closed.
http://www.b4x.com/android/forum/threads/preferenceactivity-tutorial.10608/


Thanks Erel, yes I know about the resume , and I do have the HandleSettings call in there. What I need is for the preferences screen to be updated before it closes so the item in the list reflects the updated color choice that the user just selected in the list (I'm displaying the color choice in the list summary area as seen on line 3755). I'm guessing it's not possible? Thanks.
 
Upvote 0
Top