my Application has a Preferences menu. there are 2 checkbox: "Enable Music", and "Show Hints". What I want is, There is Music List will show if check "Enable Music", else Music list will not enable. My code is:

```
boolean OPT_MUSIC_DEF = true;
protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      addPreferencesFromResource(R.xml.settings);
      if (!PreferenceManager.getDefaultSharedPreferences(this).getBoolean(OPT_MUSIC, OPT_MUSIC_DEF)){
                Preference list = findPreference("music_list");
                list.setEnabled(false);
         }
}

```

There is no error, but it work incorrect. When I unCheck "Enable Music" Music List did not hide right away, I must back and go to menu again to see Music List is hide.
Any way to make it hidden directly after uncheck "Enable Music" item?
thank for help me!