Shell
亮色/暗色主题切换(shell)
su -c '[ "$(settings --user 0 get global dark_mode_state)" = 1 ] && cmd uimode night no || cmd uimode night yes'
查询一加侧边三段键状态(shell)
su
cat /proc/tristatekey/tri_state
# 返回 1/2/3:分别代表静音、震动、响铃
下拉控制中心
cmd statusbar expand-settings
其他
#面板(ShowOverlayButton)可用
setEnableGlobalDrag(true):全局拖动(你要的“可移动”基本就靠它)
setCloseOnTouchOutside(true):点空白处关闭
setCloseOnAction(true):点按钮后自动收起(可选)
setAutoCollapse(true):自动折叠(可选)
setMaxWidthInDp / setMaxHeightInDp:最大宽高(做成面板形状)
setButtonMinWidth:按钮最小宽度(拿来做“两列网格”)
setOverlayPaddingH / setOverlayPaddingV:面板内边距
setBackgroundColor / setBackgroundAlpha:背景色/透明度
setOrientation(Port/Land):竖/横(你已枚举)
#按钮(OverlayButtonSetting)可用
setIcon / setIconBytes:图标
setIconTintColor:图标染色
setBackgroundColor:按钮背景色(做“卡片块”感)
setComponentType:Button 或 CircleProgress
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END






暂无评论内容