我尝试将小图标精确制作为 16x16,灰度化,只有灰色和白色(灰色为 hex
值 616161),以创建我的应用程序图标的轮廓。
然而,无论它在通知中只显示为白色/灰色方 block 。我做错了什么?
(我的最小 api
是 21,假设它是相关的)
最佳答案
先了解一下Android文档如下
“Update or remove assets that involve color. The system ignores all non-alpha channels in action icons and in the main notification icon. You should assume that these icons will be alpha-only. The system draws notification icons in white and action icons in dark gray.”
现在这很容易被忽略,我看到应用商店中的许多应用都有成千上万的用户没有遵循上述指南。
那么让我详细解释一下如何通过点击几下将通知图标转换为 Android 友好的图标。
在您最喜欢的图像编辑器中打开您的图标文件。将您不想显示的图像的所有部分转换为透明像素。所有颜色和非透明像素都以白色显示。让我们来看一个例子。
已编辑:感谢@Andrey Patseiko tool
关于android - 为什么我的通知小图标总是灰色的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54084498/