新增桌面双击锁屏

This commit is contained in:
乌堆小透明
2022-03-16 16:18:38 +08:00
parent 7cc2819307
commit 987f33b584
5 changed files with 148 additions and 18 deletions

View File

@@ -455,25 +455,39 @@ class SettingsActivity : MIUIActivity() {
SwitchV("remove_small_window_restrictions")
)
)
add(TextSummaryArrowV(TextSummaryV(textId = R.string.max_wallpaper_scale, onClickListener = {
MIUIDialog(activity).apply {
setTitle(R.string.max_wallpaper_scale)
setEditText("", "${activity.getString(R.string.def)}1.1, ${activity.getString(R.string.current)}${OwnSP.ownSP.getFloat("max_wallpaper_scale", 1.1f)}")
setLButton(textId = R.string.cancel) {
dismiss()
}
setRButton(textId = R.string.Done) {
if (getEditText() != "") {
OwnSP.ownSP.edit().run {
putFloat("max_wallpaper_scale", getEditText().toFloat())
apply()
add(
TextSummaryArrowV(
TextSummaryV(
textId = R.string.max_wallpaper_scale,
onClickListener = {
MIUIDialog(activity).apply {
setTitle(R.string.max_wallpaper_scale)
setEditText(
"",
"${activity.getString(R.string.def)}1.1, ${activity.getString(R.string.current)}${
OwnSP.ownSP.getFloat(
"max_wallpaper_scale",
1.1f
)
}"
)
setLButton(textId = R.string.cancel) {
dismiss()
}
setRButton(textId = R.string.Done) {
if (getEditText() != "") {
OwnSP.ownSP.edit().run {
putFloat("max_wallpaper_scale", getEditText().toFloat())
apply()
}
}
dismiss()
}
show()
}
}
dismiss()
}
show()
}
})))
})
)
)
}
}
@@ -840,6 +854,14 @@ class SettingsActivity : MIUIActivity() {
), SwitchV("home_time")
)
)
add(
TextSummaryWithSwitchV(
TextSummaryV(
textId = R.string.double_tap_to_sleep,
tipsId = R.string.home_double_tap_to_sleep_summary
), SwitchV("double_tap_to_sleep")
)
)
add(LineV())
add(TitleTextV(resId = R.string.scope_powerkeeper))
add(