On Thursday, May 26, 2011 2:44:37 AM UTC+1, Jake Colman wrote:

The only issue is when I launch the Preference
> Activity from the widget it does not display the widget-specific value
> but displays the preference's default value.
>
Are you actively setting the value for each of your widget-specific 
preferences, or are you just setting the key and hoping they'll pick up the 
correct (initial) value from the SharedPreferences? I think you need to do 
the former rather than the latter. 

IOW, my experience is that the initialization of the preferences in a 
PreferenceActivity happens before your onCreate() handler is called, so 
changing preferences' keys there won't affect their displayed values. You 
should just need a simple call to setChecked() for each boolean preference 
to initialize it to the appropriate, widget-specific value.

String

-- 
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

Reply via email to