/**
* Shows the simplified settings UI if the device configuration if the
* device configuration dictates that a simplified, single-pane UI should be
* shown.
*/
private void setupSimplePreferencesScreen() {
if (!isSimplePreferences(this)) {
return;
}
// In the simplified UI, fragments are not used at all and we instead
// use the older PreferenceActivity APIs.
// Add 'general' preferences.
addPreferencesFromResource(R.xml.pref_general);
// Add 'advanced' preferences, and a corresponding header.
PreferenceCategory fakeHeader = new PreferenceCategory(this);
fakeHeader.setTitle(R.string.pref_header_advanced);
getPreferenceScreen().addPreference(fakeHeader);
addPreferencesFromResource(R.xml.pref_advanced);
// Bind the summaries of EditText/List/Dialog/Ringtone preferences to
// their values. When their values change, their summaries are updated
// to reflect the new value, per the Android Design guidelines.
bindPreferenceSummaryToValue(findPreference("pref_defaultopts"));
// Advanced
bindPreferenceSummaryToValue(findPreference("pref_updateurl"));
bindPreferenceSummaryToValue(findPreference("pref_binaryloc"));
}
SettingsActivity.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:NetworkMapper
作者:
评论列表
文章目录