static void addSwitchPreferenceBasedOnCheckBoxPreference(final CheckBoxPreference checkBox,
final PreferenceGroup group) {
final SwitchPreference switchPref = new SwitchPreference(checkBox.getContext());
switchPref.setTitle(checkBox.getTitle());
switchPref.setKey(checkBox.getKey());
switchPref.setOrder(checkBox.getOrder());
switchPref.setPersistent(checkBox.isPersistent());
switchPref.setEnabled(checkBox.isEnabled());
switchPref.setChecked(checkBox.isChecked());
switchPref.setSummary(checkBox.getSummary());
switchPref.setSummaryOn(checkBox.getSummaryOn());
switchPref.setSummaryOff(checkBox.getSummaryOff());
switchPref.setSwitchTextOn(EMPTY_TEXT);
switchPref.setSwitchTextOff(EMPTY_TEXT);
group.addPreference(switchPref);
switchPref.setDependency(checkBox.getDependency());
}
TwoStatePreferenceHelper.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:AOSP-Kayboard-7.1.2
作者:
评论列表
文章目录