通知操作图标未显示 [英] Notification action icon didn't show
本文介绍了通知操作图标未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试在Android中显示通知,并使用
I try to show a notification in Android, and use the code from this Link. In some source people said that the icon should be totally white and some source said I should use .png instead of vector.
I try all of this ways but no one didn't help me.
I try this code:
Notification newMessageNotification =
new Notification.Builder(mContext)
.setSmallIcon(R.drawable.ic_message)
.setContentTitle(getString(R.string.title))
.setContentText(getString(R.string.content))
.addAction(action))
.build();
解决方案
after search about 1 hour in all the question with this topic finally I find out it's because of my android version! look at the image below. In Api level 24 an above, there is no icon in design!!
这篇关于通知操作图标未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文