mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-05 10:15:31 +08:00
Update version to 2.2
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
# MIUI 原生通知图标
|
# MIUI 原生通知图标
|
||||||
|
|
||||||
[](https://github.com/fankes/MIUINativeNotifyIcon)
|
[](https://github.com/fankes/MIUINativeNotifyIcon)
|
||||||
[](https://github.com/fankes/MIUINativeNotifyIcon/blob/master/LICENSE)
|
[](https://github.com/fankes/MIUINativeNotifyIcon/blob/master/LICENSE)
|
||||||
[](https://github.com/fankes/MIUINativeNotifyIcon/releases)
|
[](https://github.com/fankes/MIUINativeNotifyIcon/releases)
|
||||||
[](https://github.com/fankes/MIUINativeNotifyIcon/releases)
|
[](https://github.com/fankes/MIUINativeNotifyIcon/releases)
|
||||||
[](https://github.com/Xposed-Modules-Repo/com.fankes.miui.notify/releases)
|
[](https://github.com/Xposed-Modules-Repo/com.fankes.miui.notify/releases)
|
||||||
[](https://t.me/XiaofangInternet)
|
[](https://t.me/XiaofangInternet)
|
||||||
|
@@ -38,7 +38,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'
|
||||||
}
|
}
|
||||||
|
@@ -53,7 +53,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
private const val moduleVersion = Const.MODULE_VERSION_NAME
|
private const val moduleVersion = Const.MODULE_VERSION_NAME
|
||||||
|
|
||||||
/** 预发布的版本标识 */
|
/** 预发布的版本标识 */
|
||||||
private const val pendingFlag = "[pending]"
|
private const val pendingFlag = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 模块是否可用 */
|
/** 模块是否可用 */
|
||||||
|
@@ -32,6 +32,7 @@ import android.util.AttributeSet
|
|||||||
import androidx.appcompat.widget.SwitchCompat
|
import androidx.appcompat.widget.SwitchCompat
|
||||||
import com.fankes.miui.notify.utils.drawable.drawabletoolbox.DrawableBuilder
|
import com.fankes.miui.notify.utils.drawable.drawabletoolbox.DrawableBuilder
|
||||||
import com.fankes.miui.notify.utils.factory.dp
|
import com.fankes.miui.notify.utils.factory.dp
|
||||||
|
import com.fankes.miui.notify.utils.factory.isSystemInDarkMode
|
||||||
|
|
||||||
class MaterialSwitch(context: Context, attrs: AttributeSet?) : SwitchCompat(context, attrs) {
|
class MaterialSwitch(context: Context, attrs: AttributeSet?) : SwitchCompat(context, attrs) {
|
||||||
|
|
||||||
@@ -44,6 +45,8 @@ class MaterialSwitch(context: Context, attrs: AttributeSet?) : SwitchCompat(cont
|
|||||||
return ColorStateList(states, colors)
|
return ColorStateList(states, colors)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private val thumbColor get() = if (isSystemInDarkMode) 0xFF7C7C7C else 0xFFCCCCCC
|
||||||
|
|
||||||
init {
|
init {
|
||||||
trackDrawable = DrawableBuilder()
|
trackDrawable = DrawableBuilder()
|
||||||
.rectangle()
|
.rectangle()
|
||||||
@@ -63,8 +66,8 @@ class MaterialSwitch(context: Context, attrs: AttributeSet?) : SwitchCompat(cont
|
|||||||
.build()
|
.build()
|
||||||
trackTintList = toColors(
|
trackTintList = toColors(
|
||||||
0xFF656565.toInt(),
|
0xFF656565.toInt(),
|
||||||
0xFFCCCCCC.toInt(),
|
thumbColor.toInt(),
|
||||||
0xFFCCCCCC.toInt()
|
thumbColor.toInt()
|
||||||
)
|
)
|
||||||
isSingleLine = true
|
isSingleLine = true
|
||||||
ellipsize = TextUtils.TruncateAt.END
|
ellipsize = TextUtils.TruncateAt.END
|
||||||
|
@@ -430,7 +430,7 @@ fun Context.snake(msg: String, actionText: String = "", it: () -> Unit = {}) =
|
|||||||
Snackbar.make((this as Activity).findViewById(android.R.id.content), msg, Snackbar.LENGTH_LONG)
|
Snackbar.make((this as Activity).findViewById(android.R.id.content), msg, Snackbar.LENGTH_LONG)
|
||||||
.apply {
|
.apply {
|
||||||
if (actionText.isBlank()) return@apply
|
if (actionText.isBlank()) return@apply
|
||||||
setActionTextColor(Color.WHITE)
|
setActionTextColor(if (isSystemInDarkMode) Color.BLACK else Color.WHITE)
|
||||||
setAction(actionText) { it() }
|
setAction(actionText) { it() }
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
android:height="150dp"
|
android:height="150dp"
|
||||||
android:viewportWidth="1024"
|
android:viewportWidth="1024"
|
||||||
android:viewportHeight="1024">
|
android:viewportHeight="1024">
|
||||||
|
|
||||||
<path
|
<path
|
||||||
android:fillColor="@color/white"
|
android:fillColor="@color/white"
|
||||||
android:pathData="M192,736 L192,416C192,261.2 302,132.1 448,102.4L448,64C448,28.6 476.6,0 512,0 547.4,0 576,28.6 576,64L576,102.4C722,132.1 832,261.2 832,416L832,736 864.1,736C899.4,736 928,764.4 928,800 928,835.4 899.4,864 864.1,864L159.9,864C124.6,864 96,835.6 96,800 96,764.6 124.6,736 159.9,736L192,736ZM608,928C608,981 565,1024 512,1024 459,1024 416,981 416,928L608,928Z" />
|
android:pathData="M192,736 L192,416C192,261.2 302,132.1 448,102.4L448,64C448,28.6 476.6,0 512,0 547.4,0 576,28.6 576,64L576,102.4C722,132.1 832,261.2 832,416L832,736 864.1,736C899.4,736 928,764.4 928,800 928,835.4 899.4,864 864.1,864L159.9,864C124.6,864 96,835.6 96,800 96,764.6 124.6,736 159.9,736L192,736ZM608,928C608,981 565,1024 512,1024 459,1024 416,981 416,928L608,928Z" />
|
||||||
|
@@ -5,8 +5,8 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
appVersionName = "2.16"
|
appVersionName = "2.2"
|
||||||
appVersionCode = 26
|
appVersionCode = 27
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
|
Reference in New Issue
Block a user