mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-06 10:45:20 +08:00
Merge code
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -25,7 +25,7 @@
|
|||||||
</map>
|
</map>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<img src="https://github.com/fankes/MIUINativeNotifyIcon/blob/master/app/src/main/ic_launcher-playstore.png" width = "100" height = "100"/>
|
<img src="https://github.com/fankes/MIUINativeNotifyIcon/blob/master/app/src/main/ic_launcher-playstore.png" width = "100" height = "100"/>
|
||||||
<br/>
|
<br/>
|
||||||
@@ -12,7 +12,7 @@ Fix the native notification bar icon function abandoned by the MIUI development
|
|||||||
# 开始使用
|
# 开始使用
|
||||||
|
|
||||||
点击下载最新版本
|
点击下载最新版本
|
||||||
<a href='https://github.com/fankes/MIUINativeNotifyIcon/releases'></a>
|
<a href='https://github.com/fankes/MIUINativeNotifyIcon/releases'></a>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
⚠️ 适配说明<br/>
|
⚠️ 适配说明<br/>
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@ android {
|
|||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled true
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
|
@@ -125,7 +125,7 @@ class MainActivity : BaseActivity() {
|
|||||||
val notifyIconFixButton = findViewById<View>(R.id.config_notify_app_button)
|
val notifyIconFixButton = findViewById<View>(R.id.config_notify_app_button)
|
||||||
|
|
||||||
/** 获取 Sp 存储的信息 */
|
/** 获取 Sp 存储的信息 */
|
||||||
val statusBarIconCount = modulePrefs.getInt(HOOK_STATUS_ICON_COUNT, default = 5)
|
var statusBarIconCount = modulePrefs.getInt(HOOK_STATUS_ICON_COUNT, default = 5)
|
||||||
colorIconHookItem.isVisible = modulePrefs.getBoolean(ENABLE_MODULE, default = true)
|
colorIconHookItem.isVisible = modulePrefs.getBoolean(ENABLE_MODULE, default = true)
|
||||||
statusIconCountItem.isVisible = modulePrefs.getBoolean(ENABLE_MODULE, default = true)
|
statusIconCountItem.isVisible = modulePrefs.getBoolean(ENABLE_MODULE, default = true)
|
||||||
colorIconCompatSwitch.isVisible = modulePrefs.getBoolean(ENABLE_COLOR_ICON_HOOK, default = true)
|
colorIconCompatSwitch.isVisible = modulePrefs.getBoolean(ENABLE_COLOR_ICON_HOOK, default = true)
|
||||||
@@ -210,8 +210,9 @@ class MainActivity : BaseActivity() {
|
|||||||
(runCatching { editText.text.toString().toInt() }.getOrNull() ?: -1)
|
(runCatching { editText.text.toString().toInt() }.getOrNull() ?: -1)
|
||||||
!in 0..100 -> snake(msg = "请输入有效数值")
|
!in 0..100 -> snake(msg = "请输入有效数值")
|
||||||
editText.text.toString().isNotBlank() -> runCatching {
|
editText.text.toString().isNotBlank() -> runCatching {
|
||||||
modulePrefs.putInt(HOOK_STATUS_ICON_COUNT, editText.text.toString().trim().toInt())
|
statusBarIconCount = editText.text.toString().trim().toInt()
|
||||||
statusIconCountText.text = editText.text.toString().trim()
|
modulePrefs.putInt(HOOK_STATUS_ICON_COUNT, statusBarIconCount)
|
||||||
|
statusIconCountText.text = statusBarIconCount.toString()
|
||||||
SystemUITool.showNeedRestartSnake(context = this@MainActivity)
|
SystemUITool.showNeedRestartSnake(context = this@MainActivity)
|
||||||
}.onFailure { snake(msg = "数值格式无效") }
|
}.onFailure { snake(msg = "数值格式无效") }
|
||||||
else -> snake(msg = "请输入有效数值")
|
else -> snake(msg = "请输入有效数值")
|
||||||
|
@@ -5,8 +5,8 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
appVersionName = "1.95"
|
appVersionName = "2.0"
|
||||||
appVersionCode = 22
|
appVersionCode = 23
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
|
Reference in New Issue
Block a user