Friday, February 17, 2012

Re: [android-developers] Re: Running wallpaper to react to changes in SharedPreferences

On Feb 17, 2012, at 3:36 PM, Doo wrote:
> that was the issue, thanks for pointing it ;) Register to prefs change
> in resume event.

Actually I'd say your problem sums up within these lines in initialize() method;

SharedPreferences sharedPreferences = getSharedPrefs();
sharedPreferences.registerOnSharedPreferenceChangeListener(this);

You only grab local variable for SharedPreferences while you ought to use a class wide member variable you can reuse - and most importantly it is not garbage collected instantly.

--
H

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate