mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-04 17:55:34 +08:00
修正调整部分功能和文案
This commit is contained in:
@@ -111,13 +111,18 @@ class MainActivity : BaseActivity() {
|
||||
/** 初始化 View */
|
||||
val moduleEnableSwitch = findViewById<SwitchCompat>(R.id.module_enable_switch)
|
||||
val moduleEnableLogSwitch = findViewById<SwitchCompat>(R.id.module_enable_log_switch)
|
||||
val colorIconHookItem = findViewById<View>(R.id.config_item_color_hook)
|
||||
val notifyIconConfigItem = findViewById<View>(R.id.config_item_notify)
|
||||
val hideIconInLauncherSwitch = findViewById<SwitchCompat>(R.id.hide_icon_in_launcher_switch)
|
||||
val colorIconHookSwitch = findViewById<SwitchCompat>(R.id.color_icon_fix_switch)
|
||||
val notifyIconFixSwitch = findViewById<SwitchCompat>(R.id.notify_icon_fix_switch)
|
||||
val notifyIconFixButton = findViewById<View>(R.id.config_notify_app_button)
|
||||
/** 获取 Sp 存储的信息 */
|
||||
notifyIconConfigItem.isVisible = modulePrefs.getBoolean(ENABLE_COLOR_ICON_HOOK, default = true)
|
||||
colorIconHookItem.isVisible = modulePrefs.getBoolean(ENABLE_MODULE, default = true)
|
||||
notifyIconConfigItem.isVisible = modulePrefs.getBoolean(ENABLE_MODULE, default = true) &&
|
||||
modulePrefs.getBoolean(ENABLE_COLOR_ICON_HOOK, default = true)
|
||||
moduleEnableLogSwitch.isVisible = modulePrefs.getBoolean(ENABLE_MODULE, default = true)
|
||||
notifyIconFixButton.isVisible = modulePrefs.getBoolean(ENABLE_NOTIFY_ICON_FIX, default = true)
|
||||
moduleEnableSwitch.isChecked = modulePrefs.getBoolean(ENABLE_MODULE, default = true)
|
||||
moduleEnableLogSwitch.isChecked = modulePrefs.getBoolean(ENABLE_MODULE_LOG, default = false)
|
||||
hideIconInLauncherSwitch.isChecked = modulePrefs.getBoolean(ENABLE_HIDE_ICON)
|
||||
@@ -127,6 +132,8 @@ class MainActivity : BaseActivity() {
|
||||
if (!btn.isPressed) return@setOnCheckedChangeListener
|
||||
modulePrefs.putBoolean(ENABLE_MODULE, b)
|
||||
moduleEnableLogSwitch.isVisible = b
|
||||
colorIconHookItem.isVisible = b
|
||||
notifyIconConfigItem.isVisible = b && colorIconHookSwitch.isChecked
|
||||
SystemUITool.showNeedRestartSnake(context = this)
|
||||
}
|
||||
moduleEnableLogSwitch.setOnCheckedChangeListener { btn, b ->
|
||||
@@ -152,14 +159,13 @@ class MainActivity : BaseActivity() {
|
||||
notifyIconFixSwitch.setOnCheckedChangeListener { btn, b ->
|
||||
if (!btn.isPressed) return@setOnCheckedChangeListener
|
||||
modulePrefs.putBoolean(ENABLE_NOTIFY_ICON_FIX, b)
|
||||
notifyIconFixButton.isVisible = b
|
||||
SystemUITool.showNeedRestartSnake(context = this)
|
||||
}
|
||||
/** 通知图标优化名单按钮点击事件 */
|
||||
notifyIconFixButton.setOnClickListener { startActivity(Intent(this, ConfigureActivity::class.java)) }
|
||||
/** 重启按钮点击事件 */
|
||||
findViewById<View>(R.id.title_restart_icon).setOnClickListener { SystemUITool.restartSystemUI(context = this) }
|
||||
/** 通知图标优化名单按钮点击事件 */
|
||||
findViewById<View>(R.id.config_notify_app_button).setOnClickListener {
|
||||
startActivity(Intent(this, ConfigureActivity::class.java))
|
||||
}
|
||||
/** 恰饭! */
|
||||
findViewById<View>(R.id.link_with_follow_me).setOnClickListener {
|
||||
runCatching {
|
||||
|
@@ -184,12 +184,13 @@
|
||||
android:layout_marginBottom="10dp"
|
||||
android:alpha="0.6"
|
||||
android:lineSpacingExtra="6dp"
|
||||
android:text="模块关闭后功能都将彻底停止工作,以下选项都将不再生效。"
|
||||
android:text="模块关闭后一切功能都将彻底停止工作。"
|
||||
android:textColor="@color/colorTextDark"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/config_item_color_hook"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
@@ -228,6 +229,7 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="@drawable/bg_permotion_round"
|
||||
android:elevation="0dp"
|
||||
android:gravity="center"
|
||||
@@ -266,7 +268,7 @@
|
||||
android:layout_marginBottom="10dp"
|
||||
android:alpha="0.6"
|
||||
android:lineSpacingExtra="6dp"
|
||||
android:text="此选项默认开启,开启后将对优化名单内 APP 通知小图标进行色彩修复,特别是通过 MIPUSH 推送的通知,它们始终是彩色的,修复后使得它们的图标看起来更加符合原生规范。"
|
||||
android:text="此选项默认开启,开启后将对优化名单内的 APP 通知小图标使用单色调进行修复,特别是通过 MIPUSH 推送的通知,它们始终是 APP 默认图标(彩色的 APP 图标),修复后使得它们的图标看起来更加符合 Android 原生的统一规范。"
|
||||
android:textColor="@color/colorTextDark"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
Reference in New Issue
Block a user