0

I have a social networking app. I have a button and based on the click on the button I need to show a small icon on the top right corner of the button. it is a custom color and text. I know to show the default system number icon for like the one for unread mail you can get it from the shared application badge count. But I am trying to do something custom here.

I am thinking of building my own imageview (its background will be a custom png) and then within it a small text to show the number.

Anyone has experience with this and can recommend a better way?

4

2 回答 2

1

您可以添加带有徽章图像的 imageView 作为该按钮的子视图。

有很多自定义徽章控件可用。

请检查以下链接。

  1. 工作标签视图
  2. 自定义徽章
  3. 徽章
于 2012-12-27T04:37:44.733 回答
0

除了应用程序图标、名称和徽章值之外,您无法更改主屏幕上的任何内容。你的意思是在主屏幕上还是在标签栏上?

更新

如果您指的是应用程序中的徽章,而不是主屏幕上的徽章,请查看@MidhunMP 的答案以找到有关如何执行此操作的链接。我之前成功使用过http://www.spaulus.com/2011/04/custombadge-2-0-retina-ready-scalable-light-reflex/?lang=en 。

于 2012-12-27T04:37:31.373 回答