Giter Site home page Giter Site logo

yifeplayte / miuinativenotifyicon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fankes/miuinativenotifyicon

0.0 0.0 0.0 808 KB

Fix the native notification bar icon function abandoned by the MIUI development team.

License: GNU General Public License v3.0

Kotlin 99.20% Java 0.80%

miuinativenotifyicon's Introduction

MIUI 原生通知图标

Eclipse Marketplace Eclipse Marketplace Eclipse Marketplace


Fix the native notification bar icon function abandoned by the MIUI development team.
修复被 MIUI 开发组丢弃的原生通知图标,支持 MIUI 12、12.5、13 以及最新版本。

开始使用

点击下载最新版本 Eclipse Marketplace

⚠️ 适配说明

  • 此模块仅支持 LSPosed(作用域“系统界面”)、EdXposed(随时停止支持)、不支持太极无极
  • 目前最低支持基于 Android 9 版本的 MIUI 12 或 MIUI 12.5(最低建议)
  • 请始终保持最新版本的 LSPosed,旧版本可能会出现 Hook 不生效的问题

禁止任何商业用途

本模块完全开源免费,如果好用你可以打赏支持开发,严禁未经许可进行二改贩卖,违者必惩必究。

开始贡献

由于国内厂商 APP 的不规范彩色图标影响整体图标的美观,现在开放第三方 APP 的通知图标适配。
欢迎为通知图标优化名单贡献宝贵资源!

历史背景

这个模块诞生来源于 MIUI 的乱改和不规范,本来 MIUI 9 之后,官方给出了原生通知图标样式,后面由于用户反应通知栏经常出现黑白块。 这当然不是系统的错,而是国内 APP 极其不规范的通知图标设计,于是 MIUI 选择直接忽略这个问题把全部图标都改成了 APP 的彩色图标, 使得之前拥有自有样式的原生图标也被破坏,通知中“setSmallIcon”不再有效,这个模块就是为了修复被 MIUI 开发组忽略的图标问题, 并完美地给 MIUI 修复了黑白块图标的问题。

探索历程

  • 原生 Android 的小图标和通知图标具有状态性

  • 而 MIUI 最近的版本直接破坏了这一状态性,全部设置为 APP 的图标,不仅难看而且你无法下拉通知栏区别这些图标代表什么

  • 同样地,通知面板的图标同样遵守这一状态性


  • 而 MIUI 做了什么呢


  • 不曾记得是什么版本开始,MIUI 把通知图标改成了这个鬼样子,寻找开发组提案也是无人问津,最后转念一想,自己干吧。
  • 由于目前大量通知图标都来自 MIPUSH 发出的营销通知,而 MIPUSH 的图标都是统一的彩色应用图标,很多应用也没有适配这一特性, 在通知栏广告满天飞的情况下,MIUI 选择放弃原生通知功能,而做出这种违反原生通知规则的做法,而这些彩色图标被设置为单色调图标,也确实会发生黑白块的问题,但是同时又会破坏遵守规范的图标。
  • 真的没有办法了吗?在不断探索下,我找到了原生支持色彩判断的类
com.android.internal.util.ContrastColorUtil
  • 这个类中有一个方法可以拿出来判断图标的灰度效果
ContrastColorUtil.getInstance().isGrayscaleIcon(drawable);
  • 问题就被解决了,顺便修了一下被 MIUI 破坏的通知图标以及优化了一下应用本身方块图标的圆角...
  • 最后,我想大声问一句 MIUI 开发组:“就这?” 就这么简单的问题为什么拖了这么长时间也没有结论,还要交给用户去修复,这真的是一种负责任的表现吗?
  • 后来一想,也是啊,被国内生态毒害的用户,怎么可能会去想到这些问题呢,最后只能是我自作多情,还对 MIUI 留有一点情怀吧。
  • ——来自一个无可奈何的 MIUI 老用户

后记

  • 近期重新适配了 MIUI 12、12.5、13 版本,每个版本的图标设置方法都不一样,而且改的乱七八糟的,我都要无语了,只能用了很多折中方案,毕竟我也没有那么大精力每个版本去修复,实在是累了
  • 特地的把自己能有的小米手机刷成各种 MIUI 版本去为酷友做专项适配,我也是很累了,也希望你们能够多多支持,也能让 MIUI 做得更好
  • MIUI 再不重写,怕是永远会变成安卓之光。雷军,金凡!!

许可证

Copyright (C) 2020-2022  Fankes Studio([email protected])

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

miuinativenotifyicon's People

Contributors

fankes avatar lamprose avatar yifeplayte avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.