mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-06 02:35:32 +08:00
更正黑色下的图标为半透明效果
This commit is contained in:
@@ -30,7 +30,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
minifyEnabled false
|
||||
signingConfig signingConfigs.debug
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
@@ -546,9 +546,12 @@ class HookEntry : YukiHookXposedInitProxy {
|
||||
if (hasIgnoreStatusBarIconColor(it.context, field { name = "mNotification" }
|
||||
.of<StatusBarNotification>(instance))) it.colorFilter = null
|
||||
/** 防止图标不是纯黑的问题 */
|
||||
else it.setColorFilter(
|
||||
field { name = "mCurrentSetColor" }.of<Int>(instance)
|
||||
?.let { color -> if (color == -419430401) color else Color.BLACK } ?: 0)
|
||||
else it.apply {
|
||||
field { name = "mCurrentSetColor" }.of<Int>(instance).also { color ->
|
||||
setColorFilter(if (color == -419430401) color else Color.BLACK)
|
||||
alpha = if (color == -419430401) 1f else 0.8f
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user