Code example for RingtonePreference

Methods: setOnPreferenceChangeListener

0
		super.onPause(); 
 
		// Unregister the listener whenever a key changes 
		getPreferenceScreen().getSharedPreferences()
				.unregisterOnSharedPreferenceChangeListener(this);
		if (mRingtoneOnListener!=null) mRingtoneOnListener.setOnPreferenceChangeListener(null); //Pay attention: it is just an example
	} 
 
	@Override 
	public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
			String key) {
 
		// Update summary 
		updatePrefsSummary(sharedPreferences, findPreference(key));
	} 
 
	/** 
	 * Update summary 
	 *  
	 * @param sharedPreferences 
	 * @param pref