/**
* Sets the summary of the Ringtone Preference to the human readable name of the selected
* ringtone
*
* @param ringtonePreference The preference to update
* @param selectedRingtoneUriString The String version of the selected ringtone Uri
*/
private void updateRingtonePreferenceSummary(final RingtonePreference ringtonePreference, final String selectedRingtoneUriString) {
if (!TextUtils.isEmpty(selectedRingtoneUriString)) {
final Ringtone selectedRingtone = RingtoneManager
.getRingtone(getActivity(), Uri.parse(selectedRingtoneUriString));
if (selectedRingtone == null) {
ringtonePreference.setSummary(null);
} else {
ringtonePreference.setSummary(selectedRingtone.getTitle(getActivity()));
}
} else {
ringtonePreference.setSummary(null);
}
}
SettingsFragment.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:yelo-android
作者:
评论列表
文章目录