@Override
public void onResume() {
super.onResume();
SharedPreferences sharedPreferences = getPreferenceScreen().getSharedPreferences();
// Register self als listener for changes
sharedPreferences.registerOnSharedPreferenceChangeListener(this);
// Set initial summary state
for (int i = 0; i < getPreferenceScreen().getPreferenceCount(); i++) {
Preference preference = getPreferenceScreen().getPreference(i);
if (preference instanceof PreferenceGroup) {
PreferenceGroup preferenceGroup = (PreferenceGroup) preference;
for (int j = 0; j < preferenceGroup.getPreferenceCount(); j++) {
updatePreferenceSummary(sharedPreferences, preferenceGroup.getPreference(j));
}
} else {
updatePreferenceSummary(sharedPreferences, preference);
}
}
}
SettingsFragment.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:RBTV-Sendeplan
作者:
评论列表
文章目录