[android-developers] Re: Running wallpaper to react to changes in SharedPreferences
so i was lucky it started working! thanks again, i've fixed it to use
class field now (good that i've got get-method for that).
On Feb 17, 2:50 pm, Harri Smått <har...@gmail.com> wrote:
> 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