How can i add a counter badge to a widget?

独自空忆成欢 提交于 2019-12-11 07:54:51

问题


How can I add a counter badge to a widget? Like in this screenshot

Google Reader also has a widget with counter.


回答1:


What is the problem? A home screen widget can have a layout, and that layout can contain an ImageView and a TextView.

You will then create a background service that is checking how many messages there are e.g. every 15 minutes, and then update the widget.



来源:https://stackoverflow.com/questions/6123765/how-can-i-add-a-counter-badge-to-a-widget

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