diff --git a/app/src/main/java/com/lt2333/simplicitytools/activity/pages/t/SystemUIPageForT.kt b/app/src/main/java/com/lt2333/simplicitytools/activity/pages/t/SystemUIPageForT.kt index 5192aca4..19e86c3f 100644 --- a/app/src/main/java/com/lt2333/simplicitytools/activity/pages/t/SystemUIPageForT.kt +++ b/app/src/main/java/com/lt2333/simplicitytools/activity/pages/t/SystemUIPageForT.kt @@ -12,10 +12,9 @@ import cn.fkj233.ui.activity.view.TextSummaryV import cn.fkj233.ui.activity.view.TextV import cn.fkj233.ui.dialog.MIUIDialog import com.lt2333.simplicitytools.R -import java.util.HashMap -@BMPage("scope_systemui","System UI", hideMenu = false) +@BMPage("scope_systemui", "System UI", hideMenu = false) class SystemUIPageForT : BasePage() { override fun onCreate() { @@ -151,7 +150,12 @@ class SystemUIPageForT : BasePage() { } TextWithSpinner( TextV(textId = R.string.custom_clock_mode), - SpinnerV(customClockMode[MIUIActivity.safeSP.getInt("custom_clock_mode", 0)].toString()) { + SpinnerV( + customClockMode[MIUIActivity.safeSP.getInt( + "custom_clock_mode", + 0 + )].toString() + ) { add(customClockMode[0].toString()) { MIUIActivity.safeSP.putAny("custom_clock_mode", 0) customClockPresetBinding.binding.Send().send(false) @@ -248,7 +252,11 @@ class SystemUIPageForT : BasePage() { TextSummaryArrow(TextSummaryV(textId = R.string.custom_clock_format_geek) { MIUIDialog(activity) { setTitle(R.string.custom_clock_format_geek) - setEditText(MIUIActivity.safeSP.getString("custom_clock_format_geek", "HH:mm:ss"), "", isSingleLine = false) + setEditText( + MIUIActivity.safeSP.getString("custom_clock_format_geek", "HH:mm:ss"), + "", + isSingleLine = false + ) setLButton(textId = R.string.cancel) { dismiss() } @@ -353,6 +361,32 @@ class SystemUIPageForT : BasePage() { dataBindingSend = bigMobileTypeIconBinding.bindingSend ) ) + val bigMobileTypeLocation: HashMap = hashMapOf().also { + it[0] = getString(R.string.left) + it[1] = getString(R.string.right) + } + TextWithSpinner( + TextV(textId = R.string.big_mobile_type_location), + SpinnerV( + bigMobileTypeLocation[MIUIActivity.safeSP.getInt( + "big_mobile_type_location", + 1 + )].toString() + ) { + add(bigMobileTypeLocation[0].toString()) { + MIUIActivity.safeSP.putAny("big_mobile_type_location", 0) + } + add(bigMobileTypeLocation[1].toString()) { + MIUIActivity.safeSP.putAny("big_mobile_type_location", 1) + } + }, + dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2) + ) + TextSummaryWithSwitch( + TextSummaryV(textId = R.string.big_mobile_type_only_show_network_card), + SwitchV("big_mobile_type_only_show_network_card", false), + dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2) + ) TextSummaryWithSwitch( TextSummaryV(textId = R.string.big_mobile_type_icon_bold), SwitchV("big_mobile_type_icon_bold", true), diff --git a/app/src/main/java/com/lt2333/simplicitytools/hooks/rules/t/systemui/StatusBarBigMobileTypeIconForT.kt b/app/src/main/java/com/lt2333/simplicitytools/hooks/rules/t/systemui/StatusBarBigMobileTypeIconForT.kt index c5fdbeba..b902a0ac 100644 --- a/app/src/main/java/com/lt2333/simplicitytools/hooks/rules/t/systemui/StatusBarBigMobileTypeIconForT.kt +++ b/app/src/main/java/com/lt2333/simplicitytools/hooks/rules/t/systemui/StatusBarBigMobileTypeIconForT.kt @@ -16,6 +16,7 @@ import com.lt2333.simplicitytools.utils.xposed.base.HookRegister object StatusBarBigMobileTypeIconForT : HookRegister() { + private val getLocation = XSPUtils.getInt("big_mobile_type_location", 1) private val upAndDownPosition = XSPUtils.getInt("big_mobile_type_icon_up_and_down_position", 0) private val leftAndRightMargin = XSPUtils.getInt("big_mobile_type_icon_left_and_right_margins", 0) private val isBold = XSPUtils.getBoolean("big_mobile_type_icon_bold", true) @@ -56,10 +57,12 @@ object StatusBarBigMobileTypeIconForT : HookRegister() { val mobileTypeSingle = statusBarMobileView.findViewById(mobileTypeSingleId) //更改顺序 - mobileGroup.removeView(mobileTypeSingle) - mobileGroup.addView(mobileTypeSingle) - mobileGroup.removeView(mobileContainerLeft) - mobileGroup.addView(mobileContainerLeft) + if (getLocation == 1) { + mobileGroup.removeView(mobileTypeSingle) + mobileGroup.addView(mobileTypeSingle) + mobileGroup.removeView(mobileContainerLeft) + mobileGroup.addView(mobileContainerLeft) + } //更改样式 mobileTypeSingle.textSize = size diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index b27c0b36..d30b712d 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -235,4 +235,7 @@ 非常激进,可能会影响应用运行 应用包管理组件 禁用频繁安装应用检查 + 大移动类型图标仅显示上网卡 + 大移动类型图标位置 + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 43c1fc21..9c8deb39 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -239,4 +239,6 @@ Very aggressive and may affect application running Package Installer Disable the app installation\'s count checking + Big mobile type only show network card + Big mobile type location