Android RingtonePreference - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android RingtonePreference class.

This code example shows how to use the following methods:setOnPreferenceChangeListener
This code example shows how to use the following methods:setOnPreferenceChangeListener
This code example shows how to use the following methods:setOnPreferenceChangeListener
This code example shows how to use the following methods:setOnPreferenceChangeListener
This code example shows how to use the following methods:setOnPreferenceChangeListener
This code example shows how to use the following methods:setOnPreferenceChangeListener
        } 
         
        public void setOnPreferenceChangeListener(OnPreferenceChangeListener listener)
        { 
            mNotification.setOnPreferenceChangeListener(listener);
            mNotifySound.setOnPreferenceChangeListener(listener);
            mNotifyBefore.setOnPreferenceChangeListener(listener);
        } 
         
        private String getRingtoneSummary(String soundUri)
        { 
            if (TextUtils.isEmpty(soundUri))
                return ""; 
             
            Ringtone ring = RingtoneManager.getRingtone(getActivity(), Uri.parse(soundUri));
             
            if (ring != null)
                return ring.getTitle(getActivity());
             
            return ""; 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setOnPreferenceChangeListener
    @Override 
    public void onResume() { 
        super.onResume(); 
        mDoneIconPref.setOnPreferenceChangeListener(this);
        mDateChangeTimePref.setOnPreferenceChangeListener(this);
        mRingtonePref.setOnPreferenceChangeListener(this);
        mVibrateWhen.setOnPreferenceChangeListener(this);
    } 
 
    @Override 
    public void onPause() { 
        super.onPause(); 
        mDoneIconPref.setOnPreferenceChangeListener(null);
        mDateChangeTimePref.setOnPreferenceChangeListener(null);
        mRingtonePref.setOnPreferenceChangeListener(null);
        mVibrateWhen.setOnPreferenceChangeListener(null);
    } 
 
    public boolean onPreferenceChange(Preference preference, Object newValue) {
        boolean ret = false;
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setOnPreferenceChangeListener
    	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");
		}	 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setEnabled
		if (prefs.getBoolean("alarm", false)) {
			alarmtime.setEnabled(true);
		} 
 
		if (prefs.getBoolean("morningcall", false)) {
			alarmmusic.setEnabled(true);
			goingtime.setEnabled(true);
		} 
		 
		if (prefs.getBoolean("task", false)) {
			tasktime.setEnabled(true);
		} 
		super.onResume(); 
	} 
 
	public boolean onPreferenceChange(Preference preference, Object newValue) {
		if (preference == alarm)
		{ 
			if (!alarm.isChecked())
			{ 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getPreferenceManager
	private void saveSettings() 
	{ 
		Preferences prefs = Preferences.get(this);
		mAccount.refresh(prefs);
		 
        SharedPreferences sharedPrefs = mRingtonePref.getPreferenceManager().getSharedPreferences();
        String ringtone = sharedPrefs.getString(PREFERENCE_RINGTONE, null);
		 
		boolean updateFreqChanged = (mUpdateFrequency != mAccount.getSyncPeriod());
         
		if (updateFreqChanged || mFriendNotifications != mAccount.getFriendNotifications())
			NotifyStates.setFriendsLastNotified(this, mAccount, null);
		 
		if (updateFreqChanged || mMessageNotifications != mAccount.isMessageNotificationEnabled())
			NotifyStates.setMessagesLastNotified(this, mAccount, null);
		 
		mAccount.setFriendNotifications(mFriendNotifications);
		mAccount.setBeaconNotifications(mBeaconNotifications);
        mAccount.setMessageNotifications(mMessageNotifications);
		 
3
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Android RingtonePreference Questions & Answers:

See Code Examples for Android RingtonePreference Methods: