Code example for RingtonePreference

Methods: setSummary

0
            // Otherwise pick default ringtone Uri so that something is selected. 
            ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
        } 
        Ringtone ringtone = RingtoneManager.getRingtone(this, ringtoneUri);
        if (ringtone != null) {
            mRingtonePreference.setSummary(ringtone.getTitle(this));
            SharedPreferences.Editor editor = mePrefs.edit();
            editor.putString(PRE_RING_TONE, ringtoneUri.toString());
            editor.commit();
        } 
        mSendToVoicemailCheckPre.setChecked(mSendToVoicemail);
    } 
 
//    public void onClick(View v) { 
//        switch (v.getId()) { 
//            case R.id.ringtone: { 
//                doPickRingtone(); 
//                break; 
//            } 
//            case R.id.voicemail: { 
//                doToggleSendToVoicemail();