android - App-Icon 创建覆盖信息(数量)?

标签 android xamarin.android notifyicon

如何在 Android 应用程序上复制此行为 (iOS)?

enter image description here

从技术上讲,这绝对是可能的,因为我在我的 Android 手机上有一个自己的应用程序 - 它是一个电子邮件应用程序,图标上有一个非常相似的指示器。 (显示未读邮件数)

最佳答案

是的,您可以像 ios 一样实现覆盖。顺便说一句,它被称为徽章值。

here is one sample available on github

你只需要在你的项目中添加类并调用下面几行

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

希望对您有所帮助。

关于android - App-Icon 创建覆盖信息(数量)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16083816/

相关文章:

android - 使用 NoActionBar 主题时显示操作栏

c# - NotifyIcon.BalloonTipClicked 事件和鼠标按钮

c# - Xamarin MonoAndroid Azure移动服务InsertAsync

.net - 使用多线程时出现多个通知图标

wpf - 从后面的代码或 XAML 中的 NotifyIcon 控件设置图像

java - 选择日期、月份和年份 file.lastModified();

android - 如何查询本地PC的sdp记录?

android - 使用 SQLite 在 android 中选择当月的数据

android - 如何使用 Xamarin Forms 自定义渲染器隐藏 Android 选项卡?

c# - Android TextView defStyle 参数被忽略?