Code example for RingtonePreference

Methods: setSummary

0
		Uri ringtoneUri = Uri.parse((String) uri);
	    Ringtone ringtone = RingtoneManager.getRingtone(this, ringtoneUri);
	    if (ringtone != null) {
	        preference.setSummary(ringtone.getTitle(this));
	    } else { 
	        preference.setSummary("Silent");
	    } 
	    onContentChanged(); 
	} 
	 
	protected void updateRingtoneSummary(RingtonePreference pref) {
		String uri = getPreferenceScreen().getSharedPreferences().getString(pref.getKey(), "");
		updateRingtoneSummary(pref, uri);
	} 
	 
	static class KeyMeneger { 
		static public final int LUNCH_MODE = 0;
		static public final int DAY_MODE = 1;
		public int mode;
		 
		public KeyMeneger(int mode) {