Code example for PreferenceCategory

Methods: setEnabled

0
 	public boolean onPreferenceChange(Preference preference, Object newValue) {
 
    	Log.i("pref change " + preference + " ->" + newValue);
    	if (preference==voiceEnabledCheckBoxPref)
    		{ 
    		valuesToSpeakPrefCat.setEnabled((Boolean) newValue);
    		if ((Boolean)newValue)
    			StatusVoice.getInstance().init(this);
    		} 
    	else if (preference==pause_pref)
    	{ 
    		StatusVoice.getInstance().setPauseTimeout(0); 
    		pause_pref.setSummary(formatedPause());
    	} 
    	return true; // return that we are OK with preferences 
	} 
 
    @Override 
	protected void onDestroy() { 
		ActivityCalls.onDestroy(this);
		super.onDestroy();