zhuguifei
2026-01-14 b7ee99a71e88a08a09fe9daada6675a175d09be1
app/src/main/java/com/shlb/comb/activity/SystemSettingsActivity.java
@@ -72,10 +72,19 @@
//            Toast("测试页面: " + (isChecked ? "开启" : "关闭"));
//        });
        QMUICommonListItemView itemKeepAdmin = mGroupListView.createItemView("保持管理员模式");
        itemKeepAdmin.setAccessoryType(QMUICommonListItemView.ACCESSORY_TYPE_SWITCH);
        boolean isKeepAdmin = com.blankj.utilcode.util.SPUtils.getInstance().getBoolean("keep_admin_mode", false);
        itemKeepAdmin.getSwitch().setChecked(isKeepAdmin);
        itemKeepAdmin.getSwitch().setOnCheckedChangeListener((buttonView, isChecked) -> {
            com.blankj.utilcode.util.SPUtils.getInstance().put("keep_admin_mode", isChecked);
            Toast("管理员模式持久化: " + (isChecked ? "开启" : "关闭"));
        });
        QMUIGroupListView.newSection(this)
                .setTitle("设置")
                .addItemView(itemCmdLog, null)
//                .addItemView(itemTestPage, null)
                .addItemView(itemKeepAdmin, null)
                .addTo(mGroupListView);
    }