问题
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