如何在新应用程序上触发点击事件。使用 HomeScreen.updateIcon(bitmap) 设置图标?
我正在更改应用程序。应用程序时使用 HomeScreen.updateIcon(bitmap) 的图标。在后台。
现在,当我单击这个新应用程序时如何触发单击事件。图标就像我单击上一个应用程序时一样。图标(通过“项目属性”->“资源”设置) main() 被调用。
我已将我的主要项目设置为 CLDC app &我使用在启动时启动但没有任何资源的替代入口点。
有任何系统定义的类可以处理这个updatedIcon问题吗?
I m changing the app. icon using HomeScreen.updateIcon(bitmap) when app. is in background.
Now how to fire click event when I click on this new app. icon like when I click on previous app. icon (which is set through Project Properties-> Resources) main() is invoked.
I have set my main project as CLDC app & m using an alternative entry point which is started at startup but dont have any Resources.
Any system defined Class is there to handle this updatedIcon issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不确定,但也许您正在谈论用户触摸时聚焦的图标?
在这种情况下,请尝试 setRolloverIcon
Not sure but maybe you talking about focused icon when user touch it?
In this case try setRolloverIcon
我也不确定,我认为这不是您的应用程序图标的问题,我的理解就像您在应用程序处于后台时的某个时刻更改应用程序图标,这应该可以正常工作而不会出现问题。接下来,您希望图标何时更改(意味着应用程序现在处于其他状态),因此如果用户单击应用程序图标,您希望显示其他屏幕(比如说 Screen2),而不是您想要显示的第一个屏幕(比如说 Screen1)会正常显示吗?
如果我的理解是正确的,以下可能会有所帮助。
1. 如果您的应用程序始终在后台运行,您可能需要在 RuntimeStore 中管理应用程序状态相关信息。当您根据业务逻辑更改应用程序图标时,使用 RuntimeStore 存储状态信息,然后当用户单击主屏幕上的应用程序图标时,您可以检查 RuntimeStore 中的状态信息并执行需要的操作。
2. 如果您的应用程序并不总是在后台运行,您可以使用 PersistentStore 而不是 RuntimeStore 应用上述#1 逻辑。
我希望它会有所帮助。
谢谢,
萨米尔·纳夫迪。
I'm also not sure, i think its not an issue with your application icon, what I understood is like you are changing application icon at some point when application was in background, which should work fine with out an issue. Next you want when the icon has been changed (meaning application is in some other state now) so if user clicks on the application icon you want to show some other screen (lets say Screen2) not the first one (lets say Screen1) which you would normally display?
If my understanding is correct, may be following could be helpful.
1. If your application always run in the background, you might want to manage your application state related information in RuntimeStore. Use RuntimeStore to store the state info when you changed application icon as per your business logic, then when user clicks on the application icon at Home screen, you can check the state info in RuntimeStore and do the needful.
2. If your application do not always run in background, you can apply the above #1 logic using PersistentStore instead of RuntimeStore.
I hope it would help.
Thanks,
Sameer Nafdey.