mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-06 18:55:25 +08:00
增加通知优化图标过滤搜索功能,更新版本到 1.5
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -9,8 +9,10 @@
|
|||||||
<entry key="app/src/main/res/drawable/permotion_round.xml" value="0.256" />
|
<entry key="app/src/main/res/drawable/permotion_round.xml" value="0.256" />
|
||||||
<entry key="app/src/main/res/drawable/white_round.xml" value="0.256" />
|
<entry key="app/src/main/res/drawable/white_round.xml" value="0.256" />
|
||||||
<entry key="app/src/main/res/layout/activity_config.xml" value="0.42168674698795183" />
|
<entry key="app/src/main/res/layout/activity_config.xml" value="0.42168674698795183" />
|
||||||
|
<entry key="app/src/main/res/layout/activity_login.xml" value="0.4375" />
|
||||||
<entry key="app/src/main/res/layout/activity_main.xml" value="0.37516748548459133" />
|
<entry key="app/src/main/res/layout/activity_main.xml" value="0.37516748548459133" />
|
||||||
<entry key="app/src/main/res/layout/adapter_config.xml" value="0.4375" />
|
<entry key="app/src/main/res/layout/adapter_config.xml" value="0.4375" />
|
||||||
|
<entry key="app/src/main/res/layout/dia_icon_search.xml" value="0.4307692307692308" />
|
||||||
<entry key="app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" value="0.44871794871794873" />
|
<entry key="app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" value="0.44871794871794873" />
|
||||||
</map>
|
</map>
|
||||||
</option>
|
</option>
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
# MIUI 原生通知图标
|
# MIUI 原生通知图标
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
<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/>
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.fankes.miui.notify"
|
applicationId "com.fankes.miui.notify"
|
||||||
minSdk 23
|
minSdk 28
|
||||||
targetSdk 31
|
targetSdk 31
|
||||||
versionCode rootProject.ext.appVersionCode
|
versionCode rootProject.ext.appVersionCode
|
||||||
versionName rootProject.ext.appVersionName
|
versionName rootProject.ext.appVersionName
|
||||||
@@ -42,6 +42,9 @@ android {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = '1.8'
|
jvmTarget = '1.8'
|
||||||
}
|
}
|
||||||
|
buildFeatures {
|
||||||
|
viewBinding true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 移除无效耗时 lint Task */
|
/** 移除无效耗时 lint Task */
|
||||||
@@ -57,6 +60,9 @@ tasks.whenTaskAdded {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "com.github.topjohnwu.libsu:core:3.1.2"
|
implementation "com.github.topjohnwu.libsu:core:3.1.2"
|
||||||
|
implementation 'androidx.annotation:annotation:1.3.0'
|
||||||
|
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
|
||||||
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
|
||||||
compileOnly 'de.robv.android.xposed:api:82'
|
compileOnly 'de.robv.android.xposed:api:82'
|
||||||
implementation 'com.highcapable.yukihookapi:api:1.0.1'
|
implementation 'com.highcapable.yukihookapi:api:1.0.1'
|
||||||
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.0.1'
|
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.0.1'
|
||||||
|
@@ -16,43 +16,42 @@
|
|||||||
<meta-data
|
<meta-data
|
||||||
android:name="xposedmodule"
|
android:name="xposedmodule"
|
||||||
android:value="true" />
|
android:value="true" />
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="xposeddescription"
|
android:name="xposeddescription"
|
||||||
android:value="MIUI 状态栏原生图标,修复 12.5、13 后期被破坏的彩色图标。\n开发者:酷安 @星夜不荟" />
|
android:value="MIUI 状态栏原生图标,修复 12.5、13 后期被破坏的彩色图标。\n开发者:酷安 @星夜不荟" />
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="xposedminversion"
|
android:name="xposedminversion"
|
||||||
android:value="93" />
|
android:value="93" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.fankes.miui.notify.ui.MainActivity"
|
android:name=".ui.MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:screenOrientation="behind">
|
android:screenOrientation="behind">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="de.robv.android.xposed.category.MODULE_SETTINGS" />
|
<category android:name="de.robv.android.xposed.category.MODULE_SETTINGS" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity-alias
|
<activity-alias
|
||||||
android:name="com.fankes.miui.notify.Home"
|
android:name=".Home"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:screenOrientation="behind"
|
android:screenOrientation="behind"
|
||||||
android:targetActivity="com.fankes.miui.notify.ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity-alias>
|
</activity-alias>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.fankes.miui.notify.ui.ConfigureActivity"
|
android:name=".ui.ConfigureActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:screenOrientation="behind" />
|
android:screenOrientation="behind" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@@ -0,0 +1,24 @@
|
|||||||
|
package com.fankes.miui.notify.data
|
||||||
|
|
||||||
|
import com.fankes.miui.notify.data.model.LoggedInUser
|
||||||
|
import java.io.IOException
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class that handles authentication w/ login credentials and retrieves user information.
|
||||||
|
*/
|
||||||
|
class LoginDataSource {
|
||||||
|
|
||||||
|
fun login(username: String, password: String): Result<LoggedInUser> {
|
||||||
|
try {
|
||||||
|
// TODO: handle loggedInUser authentication
|
||||||
|
val fakeUser = LoggedInUser(java.util.UUID.randomUUID().toString(), "Jane Doe")
|
||||||
|
return Result.Success(fakeUser)
|
||||||
|
} catch (e: Throwable) {
|
||||||
|
return Result.Error(IOException("Error logging in", e))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun logout() {
|
||||||
|
// TODO: revoke authentication
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,46 @@
|
|||||||
|
package com.fankes.miui.notify.data
|
||||||
|
|
||||||
|
import com.fankes.miui.notify.data.model.LoggedInUser
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class that requests authentication and user information from the remote data source and
|
||||||
|
* maintains an in-memory cache of login status and user credentials information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class LoginRepository(val dataSource: LoginDataSource) {
|
||||||
|
|
||||||
|
// in-memory cache of the loggedInUser object
|
||||||
|
var user: LoggedInUser? = null
|
||||||
|
private set
|
||||||
|
|
||||||
|
val isLoggedIn: Boolean
|
||||||
|
get() = user != null
|
||||||
|
|
||||||
|
init {
|
||||||
|
// If user credentials will be cached in local storage, it is recommended it be encrypted
|
||||||
|
// @see https://developer.android.com/training/articles/keystore
|
||||||
|
user = null
|
||||||
|
}
|
||||||
|
|
||||||
|
fun logout() {
|
||||||
|
user = null
|
||||||
|
dataSource.logout()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun login(username: String, password: String): Result<LoggedInUser> {
|
||||||
|
// handle login
|
||||||
|
val result = dataSource.login(username, password)
|
||||||
|
|
||||||
|
if (result is Result.Success) {
|
||||||
|
setLoggedInUser(result.data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setLoggedInUser(loggedInUser: LoggedInUser) {
|
||||||
|
this.user = loggedInUser
|
||||||
|
// If user credentials will be cached in local storage, it is recommended it be encrypted
|
||||||
|
// @see https://developer.android.com/training/articles/keystore
|
||||||
|
}
|
||||||
|
}
|
18
app/src/main/java/com/fankes/miui/notify/data/Result.kt
Normal file
18
app/src/main/java/com/fankes/miui/notify/data/Result.kt
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package com.fankes.miui.notify.data
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A generic class that holds a value with its loading status.
|
||||||
|
* @param <T>
|
||||||
|
*/
|
||||||
|
sealed class Result<out T : Any> {
|
||||||
|
|
||||||
|
data class Success<out T : Any>(val data: T) : Result<T>()
|
||||||
|
data class Error(val exception: Exception) : Result<Nothing>()
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return when (this) {
|
||||||
|
is Success<*> -> "Success[data=$data]"
|
||||||
|
is Error -> "Error[exception=$exception]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,9 @@
|
|||||||
|
package com.fankes.miui.notify.data.model
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data class that captures user information for logged in users retrieved from LoginRepository
|
||||||
|
*/
|
||||||
|
data class LoggedInUser(
|
||||||
|
val userId: String,
|
||||||
|
val displayName: String
|
||||||
|
)
|
@@ -35,6 +35,7 @@ import android.widget.ListView
|
|||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.constraintlayout.utils.widget.ImageFilterView
|
import androidx.constraintlayout.utils.widget.ImageFilterView
|
||||||
|
import androidx.core.view.isVisible
|
||||||
import com.fankes.miui.notify.R
|
import com.fankes.miui.notify.R
|
||||||
import com.fankes.miui.notify.hook.factory.isAppNotifyHookAllOf
|
import com.fankes.miui.notify.hook.factory.isAppNotifyHookAllOf
|
||||||
import com.fankes.miui.notify.hook.factory.isAppNotifyHookOf
|
import com.fankes.miui.notify.hook.factory.isAppNotifyHookOf
|
||||||
@@ -43,20 +44,58 @@ import com.fankes.miui.notify.hook.factory.putAppNotifyHookOf
|
|||||||
import com.fankes.miui.notify.params.IconPackParams
|
import com.fankes.miui.notify.params.IconPackParams
|
||||||
import com.fankes.miui.notify.ui.base.BaseActivity
|
import com.fankes.miui.notify.ui.base.BaseActivity
|
||||||
import com.fankes.miui.notify.utils.SystemUITool
|
import com.fankes.miui.notify.utils.SystemUITool
|
||||||
|
import com.fankes.miui.notify.utils.showDialog
|
||||||
import com.fankes.miui.notify.view.MaterialSwitch
|
import com.fankes.miui.notify.view.MaterialSwitch
|
||||||
|
import com.google.android.material.textfield.TextInputEditText
|
||||||
|
|
||||||
class ConfigureActivity : BaseActivity() {
|
class ConfigureActivity : BaseActivity() {
|
||||||
|
|
||||||
|
/** 当前筛选条件 */
|
||||||
|
private var filterText = ""
|
||||||
|
|
||||||
|
/** 回调适配器改变 */
|
||||||
|
private var onChanged: (() -> Unit)? = null
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_config)
|
setContentView(R.layout.activity_config)
|
||||||
/** 返回按钮点击事件 */
|
/** 返回按钮点击事件 */
|
||||||
findViewById<View>(R.id.title_back_icon).setOnClickListener { onBackPressed() }
|
findViewById<View>(R.id.title_back_icon).setOnClickListener { onBackPressed() }
|
||||||
/** 设置标题个数文本 */
|
/** 刷新适配器结果相关 */
|
||||||
findViewById<TextView>(R.id.config_title_count_text).text = "已适配 ${IconPackParams.iconDatas.size} 个 APP 的通知图标"
|
refreshAdapterResult()
|
||||||
/** 设置搜索按钮点击事件 */
|
/** 设置过滤按钮点击事件 */
|
||||||
findViewById<View>(R.id.config_title_search).setOnClickListener {
|
findViewById<View>(R.id.config_title_filter).setOnClickListener {
|
||||||
Toast.makeText(this, "后期开放", Toast.LENGTH_SHORT).show()
|
showDialog {
|
||||||
|
title = "按条件过滤"
|
||||||
|
var editText: TextInputEditText
|
||||||
|
addView(R.layout.dia_icon_filter).apply {
|
||||||
|
editText = findViewById<TextInputEditText>(R.id.dia_icon_filter_input_edit).apply {
|
||||||
|
requestFocus()
|
||||||
|
invalidate()
|
||||||
|
if (filterText.isNotBlank()) {
|
||||||
|
setText(filterText)
|
||||||
|
setSelection(filterText.length)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
confirmButton {
|
||||||
|
if (editText.text.toString().isNotBlank()) {
|
||||||
|
filterText = editText.text.toString().trim()
|
||||||
|
onChanged?.invoke()
|
||||||
|
refreshAdapterResult()
|
||||||
|
} else {
|
||||||
|
Toast.makeText(applicationContext, "条件不能为空", Toast.LENGTH_SHORT).show()
|
||||||
|
it.performClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cancelButton()
|
||||||
|
if (filterText.isNotBlank())
|
||||||
|
neutralButton(text = "清除条件") {
|
||||||
|
filterText = ""
|
||||||
|
onChanged?.invoke()
|
||||||
|
refreshAdapterResult()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/** 设置列表元素和 Adapter */
|
/** 设置列表元素和 Adapter */
|
||||||
findViewById<ListView>(R.id.config_list_view).apply {
|
findViewById<ListView>(R.id.config_list_view).apply {
|
||||||
@@ -64,9 +103,9 @@ class ConfigureActivity : BaseActivity() {
|
|||||||
|
|
||||||
private val inflater = LayoutInflater.from(context)
|
private val inflater = LayoutInflater.from(context)
|
||||||
|
|
||||||
override fun getCount() = IconPackParams.iconDatas.size
|
override fun getCount() = iconDatas.size
|
||||||
|
|
||||||
override fun getItem(position: Int) = IconPackParams.iconDatas[position]
|
override fun getItem(position: Int) = iconDatas[position]
|
||||||
|
|
||||||
override fun getItemId(position: Int) = position.toLong()
|
override fun getItemId(position: Int) = position.toLong()
|
||||||
|
|
||||||
@@ -118,7 +157,7 @@ class ConfigureActivity : BaseActivity() {
|
|||||||
lateinit var switchOpen: MaterialSwitch
|
lateinit var switchOpen: MaterialSwitch
|
||||||
lateinit var switchAll: MaterialSwitch
|
lateinit var switchAll: MaterialSwitch
|
||||||
}
|
}
|
||||||
}
|
}.apply { onChanged = { notifyDataSetChanged() } }
|
||||||
}
|
}
|
||||||
/** 设置点击事件 */
|
/** 设置点击事件 */
|
||||||
findViewById<View>(R.id.config_cbr_button).setOnClickListener {
|
findViewById<View>(R.id.config_cbr_button).setOnClickListener {
|
||||||
@@ -134,4 +173,22 @@ class ConfigureActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 刷新适配器结果相关 */
|
||||||
|
private fun refreshAdapterResult() {
|
||||||
|
findViewById<TextView>(R.id.config_title_count_text).text =
|
||||||
|
if (filterText.isBlank()) "已适配 ${iconDatas.size} 个 APP 的通知图标"
|
||||||
|
else "“${filterText}” 匹配到 ${iconDatas.size} 个结果"
|
||||||
|
findViewById<View>(R.id.config_list_no_data_view).isVisible = iconDatas.isEmpty()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前结果下的图标数组
|
||||||
|
* @return [Array]
|
||||||
|
*/
|
||||||
|
private val iconDatas
|
||||||
|
get() = if (filterText.isBlank()) IconPackParams.iconDatas
|
||||||
|
else IconPackParams.iconDatas.filter {
|
||||||
|
it.appName.lowercase().contains(filterText.lowercase()) || it.packageName.lowercase().contains(filterText.lowercase())
|
||||||
|
}.toTypedArray()
|
||||||
}
|
}
|
@@ -20,7 +20,7 @@
|
|||||||
*
|
*
|
||||||
* This file is Created by fankes on 2022/1/7.
|
* This file is Created by fankes on 2022/1/7.
|
||||||
*/
|
*/
|
||||||
@file:Suppress("unused")
|
@file:Suppress("unused", "DEPRECATION")
|
||||||
|
|
||||||
package com.fankes.miui.notify.utils
|
package com.fankes.miui.notify.utils
|
||||||
|
|
||||||
@@ -28,7 +28,11 @@ import android.app.AlertDialog
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.graphics.drawable.GradientDrawable
|
import android.graphics.drawable.GradientDrawable
|
||||||
|
import android.util.DisplayMetrics
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.WindowManager
|
||||||
|
import kotlin.math.round
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构造对话框
|
* 构造对话框
|
||||||
@@ -44,6 +48,8 @@ class DialogBuilder(private val context: Context) {
|
|||||||
|
|
||||||
private var instance: AlertDialog.Builder? = null // 实例对象
|
private var instance: AlertDialog.Builder? = null // 实例对象
|
||||||
|
|
||||||
|
private var customLayoutView: View? = null // 自定义布局
|
||||||
|
|
||||||
init {
|
init {
|
||||||
instance = AlertDialog.Builder(context, android.R.style.Theme_Material_Light_Dialog)
|
instance = AlertDialog.Builder(context, android.R.style.Theme_Material_Light_Dialog)
|
||||||
}
|
}
|
||||||
@@ -65,6 +71,16 @@ class DialogBuilder(private val context: Context) {
|
|||||||
instance?.setMessage(value)
|
instance?.setMessage(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置对话框自定义布局
|
||||||
|
* @param resId 属性资源 Id
|
||||||
|
* @return [View]
|
||||||
|
*/
|
||||||
|
fun addView(resId: Int): View {
|
||||||
|
customLayoutView = LayoutInflater.from(context).inflate(resId, null)
|
||||||
|
return customLayoutView ?: error("Inflate $resId failed")
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置对话框确定按钮
|
* 设置对话框确定按钮
|
||||||
* @param text 按钮文本内容
|
* @param text 按钮文本内容
|
||||||
@@ -91,6 +107,9 @@ class DialogBuilder(private val context: Context) {
|
|||||||
|
|
||||||
/** 显示对话框 */
|
/** 显示对话框 */
|
||||||
internal fun show() = instance?.create()?.apply {
|
internal fun show() = instance?.create()?.apply {
|
||||||
|
val dm = DisplayMetrics()
|
||||||
|
(context.getSystemService(Context.WINDOW_SERVICE) as WindowManager).defaultDisplay.getMetrics(dm)
|
||||||
|
customLayoutView?.let { setView(it.apply { minimumWidth = round(dm.widthPixels / 1.3).toInt() }) }
|
||||||
window?.setBackgroundDrawable(GradientDrawable(
|
window?.setBackgroundDrawable(GradientDrawable(
|
||||||
GradientDrawable.Orientation.TOP_BOTTOM,
|
GradientDrawable.Orientation.TOP_BOTTOM,
|
||||||
intArrayOf(Color.WHITE, Color.WHITE)
|
intArrayOf(Color.WHITE, Color.WHITE)
|
||||||
|
@@ -26,11 +26,13 @@
|
|||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginEnd="25dp"
|
android:layout_marginEnd="25dp"
|
||||||
android:src="@mipmap/back"
|
android:src="@mipmap/back"
|
||||||
android:tint="@color/colorTextGray" />
|
android:tint="@color/colorTextGray"
|
||||||
|
android:tooltipText="返回" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center|start"
|
android:gravity="center|start"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@@ -56,12 +58,13 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||||
android:id="@+id/config_title_search"
|
android:id="@+id/config_title_filter"
|
||||||
android:layout_width="20dp"
|
android:layout_width="22dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="22dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:src="@mipmap/icon_search"
|
android:src="@mipmap/icon_filter"
|
||||||
android:tint="@color/colorTextGray" />
|
android:tint="@color/colorTextGray"
|
||||||
|
android:tooltipText="按条件过滤" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -95,18 +98,33 @@
|
|||||||
tools:ignore="SmallSp" />
|
tools:ignore="SmallSp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView
|
<FrameLayout
|
||||||
android:id="@+id/config_list_view"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1">
|
||||||
android:divider="@color/trans"
|
|
||||||
android:dividerHeight="15dp"
|
<TextView
|
||||||
android:fadingEdgeLength="10dp"
|
android:id="@+id/config_list_no_data_view"
|
||||||
android:listSelector="@null"
|
android:layout_width="wrap_content"
|
||||||
android:padding="15dp"
|
android:layout_height="wrap_content"
|
||||||
android:requiresFadingEdge="vertical"
|
android:layout_gravity="center"
|
||||||
android:scrollbars="none" />
|
android:text="噫,竟然什么都没找到~"
|
||||||
|
android:textColor="@color/colorTextDark"
|
||||||
|
android:textSize="17sp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/config_list_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:divider="@color/trans"
|
||||||
|
android:dividerHeight="15dp"
|
||||||
|
android:fadingEdgeLength="10dp"
|
||||||
|
android:listSelector="@null"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:requiresFadingEdge="vertical"
|
||||||
|
android:scrollbars="none" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/config_cbr_button"
|
android:id="@+id/config_cbr_button"
|
||||||
|
@@ -279,7 +279,7 @@
|
|||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:alpha="0.6"
|
android:alpha="0.6"
|
||||||
android:lineSpacingExtra="6dp"
|
android:lineSpacingExtra="6dp"
|
||||||
android:text="⚠️ 由于你的系统版本过低,状态栏上 MIPUSH 的彩色图标由于不能识别反色将不会被优化为黑白小图标,仅在通知栏生效。"
|
android:text="⚠️ 你的 MIUI 版本过低,状态栏上 MIPUSH 的彩色图标由于不能识别反色将不会被优化为黑白小图标,仅在通知栏生效。"
|
||||||
android:textColor="#FF9800"
|
android:textColor="#FF9800"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
@@ -359,7 +359,7 @@
|
|||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:alpha="0.8"
|
android:alpha="0.8"
|
||||||
android:lineSpacingExtra="6dp"
|
android:lineSpacingExtra="6dp"
|
||||||
android:text="Q.这个模块是如何诞生的?\nA.这个模块诞生来源于 MIUI 的乱改和不规范,本来 MIUI 9 之后,官方给出了原生通知图标样式,后面由于用户反应通知栏经常出现黑白块,这当然不是系统的错,而是国内 APP 极其不规范的通知图标设计,于是 MIUI 选择直接忽略这个问题把全部图标都改成了 APP 的彩色图标,使得之前拥有自有样式的原生图标也被破坏,通知中“setSmallIcon”不再有效,这个模块就是为了修复被 MIUI 开发组忽略的图标问题,并完美地给 MIUI 修复了黑白块图标的问题。"
|
android:text="Q.这个模块是如何诞生的?\nA.这个模块诞生来源于 MIUI 的乱改和不规范,本来 MIUI 9 之后,官方给出了原生通知图标样式,后面由于用户反应通知栏经常出现黑白块。\n这当然不是系统的错,而是国内 APP 和 MIPUSH 的通知极其不规范的通知图标设计。\n但是呢,接到反馈后 MIUI 开发组选择直接忽略这个问题,在 2021-5-18 的开发版开始,把全部通知图标都改成了 APP 的彩色图标,使得之前拥有自有样式的原生图标也被破坏。\n对于 Android 开发者来说,官方文档中的 “setSmallIcon” 不再适用于魔改后的 MIUI,这将会严重破坏非常多的状态图标。\n当然,国内的手机生态除了 MIPUSH 的营销通知就是社交软件的通知,可能大部分人都不会在意这件事情。\n但是,这个模块就是为了修复被 MIUI 开发组忽略的图标问题才诞生的,并完美地给 MIUI 修复了黑白块图标的问题。"
|
||||||
android:textColor="@color/colorTextDark"
|
android:textColor="@color/colorTextDark"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="0.8"
|
android:alpha="0.8"
|
||||||
android:lineSpacingExtra="6dp"
|
android:lineSpacingExtra="6dp"
|
||||||
android:text="本软件是免费开源项目,遵循 GPL 协议,你可以点击这里前往 Github 查看源码以及获取模块更新。\n严禁以任何形式贩卖、商用本软件,否则开发者有权追究其法律责任。"
|
android:text="本软件是免费开源项目,遵循 AGPL3.0 协议,你可以点击这里前往 Github 查看源码以及获取模块更新。"
|
||||||
android:textColor="@color/colorTextDark"
|
android:textColor="@color/colorTextDark"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
24
app/src/main/res/layout/dia_icon_filter.xml
Normal file
24
app/src/main/res/layout/dia_icon_filter.xml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="15dp"
|
||||||
|
android:paddingTop="15dp"
|
||||||
|
android:paddingRight="15dp"
|
||||||
|
tools:ignore="HardcodedText">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/dia_icon_filter_input_edit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:hint="可输入 APP 名称、包名"
|
||||||
|
android:singleLine="true" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
</LinearLayout>
|
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB |
@@ -5,8 +5,8 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
appVersionName = "1.36(pending)"
|
appVersionName = "1.5"
|
||||||
appVersionCode = 8
|
appVersionCode = 9
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
|
Reference in New Issue
Block a user