views:

26

answers:

1

Just a simple question in onSharedPreferenceChanged you can do something based on if a change is made in a specific key which would look like, if (key.equals(Theme_Preference)). I want to do the same thing but instead of just a key I want it to be for a specific entryValue in that key. Hope this makes sense.

A: 

So..how about something like...

public void onSharedPreferenceChanged(SharedPreferences prefs, String key) 
    {
        if (key.equals(Theme_Preference) && prefs.getString(key, "default value").equals("the value you want to respond to"))
        {
            // do your stuff
        }

    }
mmeyer
Thanks, funny thing is I understand/knew about everything you said. Guess I'm still learning to thing like a coder.
TylerS