[英]Number as icon of notification Android
my problem seems be without (smart) solution... please help 我的问题似乎是没有(智能)解决方案...请帮助
I'm working on app that update a persistent notification with temp and weather description. 我正在开发可使用温度和天气描述更新持久性通知的应用程序。
The problem is that I want show current temp in notification bar but 问题是我想在通知栏中显示当前温度,但是
mNotification = new Notification.Builder(ctx)
.setTicker(number);
this code show but with auto-hide, the only value data still persist in bar it's smallIcon. 此代码显示,但具有自动隐藏功能,唯一的值数据仍保留在栏中,它是smallIcon。
The problem is that setSmallIcon() want a resource (int) to work, this is carzy, there are other options? 问题是setSmallIcon()想要一个资源(int)起作用,这很麻烦,还有其他选择吗?
I don't want put inside app 100 or more little images with number, it's no sense... 我不想在应用程序中放入100张或更多带有数字的小图像,这是没有道理的...
Thank you 谢谢
No it is not possible according to the current android notification design principle. 不,根据当前的android通知设计原则,这是不可能的。 You are only allowed to add text in the notification area/status bar.
仅允许您在通知区域/状态栏中添加文本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.