做一个动态的启动图标 [英] Make a dynamic launcher icon

查看:373
本文介绍了做一个动态的启动图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建类似于Android的原生信息应用程序的起动器图标。这个应用程序的图标有一个形象,但也有一个动态变化的数字(即对应于未读邮件的数量某种计数器)。另外这个图标是不是一个小部件,因为它是一个真正的图标,这是present应用程序抽屉中。

有人能向我解释如何我可以去实现这一目标?我发现了一些解决方案,包括设置为1x1的尺寸小部件,但我不希望人们快捷方式添加到我的应用程序的窗口小部件。如果可能的话,我要处理的启动器图标以某种方式的程序化

在此先感谢!

请注意: 有类似的问题,以我的要求是很久以前。然而,鉴于Android的API已经经历了很多从那时起变化了,上了年纪的答案可能会或可能不适用 - 因此需要一个新的问题。 (<一href="http://stackoverflow.com/questions/1103027/how-to-change-an-application-icon-programmatically-in-android">link)

解决方案
  

有人能解释我怎样才能做到这一点?

您不能,总之用自己的发射器创建自己的主屏幕。

I want to create a launcher icon similar to the native Messaging application in Android. The icon of this app has an image but also have a dynamically changing number(a counter of some sort that corresponds to the number of unread messages). Also this icon it is not an widget, as it's an actual icon that's present in the application drawer.

Can someone explain to me how I can go about to achieve this? I found some solution that includes a widget with the dimensions set to 1x1 but I do not want people to add shortcuts to my app as widget. If possible, I'd want to manipulate the launcher icon in some programmatical way.

Thanks in advance!

Note: There is a question similar to mine asked a long time ago. However, seeing that the Android API has gone through a lot of changes since then, the older answers may or may not be applicable - hence the need for a new question. (link)

解决方案

Can someone explain me how can I do this ?

You can't, short of creating your own home screen with your own launcher.

这篇关于做一个动态的启动图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆