Android的 - 更改通知图标 [英] Android - Change Notification Icon

查看:126
本文介绍了Android的 - 更改通知图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,如果它可能有一个不同的Notificationbar图标比启动或应用程序图标。我想为我的推送通知显示其他图标。这可能吗?谢谢你。

I would like to know if its possible to have an different Notificationbar Icon than the Launcher or Application Icon. I would like to display an other icon for my push notifications. Is this possible? Thanks.

推荐答案

有关API&LT; 11,通知构造允许一个<一href="http://developer.android.com/reference/android/app/Notification.html#Notification%28int,%20java.lang.CharSequence,%20long%29">icon要指定。对于API> 10, setSmallIcon setLargeIcon 方法<一href="http://developer.android.com/reference/android/app/Notification.Builder.html">Notifcation.Builder让同样的事情。

For API < 11, the Notification constructor allowed an icon to be specified. For API > 10, the setSmallIcon and setLargeIcon methods for Notifcation.Builder allow much the same thing.

这篇关于Android的 - 更改通知图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆