Code example for RingtonePreference

Methods: setOnPreferenceChangeListener

0
    	mPollingIntervalList =  (ListPreference) (ps.findPreference(mResources.getString(R.string.preference_notification_checkpollinginterval)));
    } 
     
    private void initViews(){ 
    	  mEnableNotifsCheckBox.setOnPreferenceChangeListener(this);
    	  mRingtoneList.setOnPreferenceChangeListener(this);
    	 // mClearLocalCache.setOnPreferenceClickListener(this); 
    	 // mClearSdCardCache.setOnPreferenceClickListener(this); 
    	 // mSdCardCacheCheckBox.setOnPreferenceChangeListener(this); 
    	  mPollingIntervalList.setOnPreferenceChangeListener(this);
    } 
         
    private void updateNotifRingtoneUi(){								 
		Uri ringtoneContentUri = App.INSTANCE.getNotificationRingtoneUri();
		if(ringtoneContentUri != null){
			String ringtoneName = RingtoneManager.getRingtone(App.INSTANCE,ringtoneContentUri).getTitle(App.INSTANCE);
			mRingtoneList.setSummary(ringtoneName);
		}else{		 
			mRingtoneList.setSummary("Silent");
		}	 
Connect your IDE to all the code out there  Get Codota for Java