How do I show badge counts on the app icon or in widget

喜夏-厌秋 提交于 2019-12-23 13:06:56

问题


For example: my app got few messages and I need to inform user about this.

Do I need make widget?

I read this How do I add a number to the launcher icon like HTC mail Does?, but it looks like I can't do this. Only for HTC.


回答1:


Launcher icons as managed by the launcher which the default launcher does not have this functionality.

I would recommend to use the notification bar and then secondary a possible widget but it wouldn't be required.

As a note, a launcher that does have this functionality is ADW but I don't believe there is an API for it so they would manager which notifications get displayed on which applications. ADWNotifier: check here




回答2:


Android's user notification design principle revolves around the notification bar. The user should be always alerted only using notifications.



来源:https://stackoverflow.com/questions/14273225/how-do-i-show-badge-counts-on-the-app-icon-or-in-widget

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!