App-Icon Create an Overlayinformation (Number)?

时光怂恿深爱的人放手 提交于 2019-12-06 05:09:24

问题


How can I clone this behaviour (iOS) on an Android-App?

Technically its definitly possible as I have an app by my own on my Androidphone - its an Email-App with a very similiar indicator on the Icon. (shows the number of unread Emails)


回答1:


If you are referring to doing this on the home screen, that is an app widget.




回答2:


yes you can implement overlay like ios.. by the way it is called badge value.

here is one sample available on github

You just have to add classes in your project and call below lines

View target = findViewById(R.id.target_view);
BadgeView badge = new BadgeView(this, target);
badge.setText("1");
badge.show();

hope it helps.



来源:https://stackoverflow.com/questions/16083816/app-icon-create-an-overlayinformation-number

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