gpt4 book ai didi

Android - VectorXML 通知图标颜色,SAMSUNG 错误?

转载 作者:搜寻专家 更新时间:2023-11-01 09:45:23 25 4
gpt4 key购买 nike

我尝试使用 new VectorXML 将小图标放入 NotificationCompat.Builder。在 Nexus 设备上一切正常,Android 会自动将图标着色为所需的颜色,主要是白色。但在 Samsung(S5 和 Android 6.0.1)上,图标从不着色。看截图:

enter image description here

enter image description here

知道为什么吗?这是三星的实现错误?

最佳答案

对于所有人,

解决方案是将基础(填充)颜色设为白色,然后“自动”色调在三星设备上也能正常工作! ;)

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">

<path
android:fillColor="#FFF"
android:pathData="M12,12m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>

</vector>

关于Android - VectorXML 通知图标颜色,SAMSUNG 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38308722/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com