创建一个简单的屏幕小部件,其中包含执行 onClick 的按钮?
我正在尝试使用一个按钮制作一个主屏幕小部件,该按钮调用一个方法来使用 onClick 执行一些计算。
我已经用谷歌搜索了它,但只找到了调用特定活动的小部件。我不想调用活动,只需使用屏幕上的小部件。
有擅长这方面的人可以帮忙吗?
I am trying to make a homescreen widget with a single Button which calls a method to perform some calculations using onClick.
I have googled it but only found the widgets calling specific activities .I dont want to call a activity just use the widget onscreen.
Anyone good at this could help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Widget 只是一个视图,它必须由后端提供商/服务支持。您可以在服务中进行计算
Widget is just a View it has to be supported by a backend provider / service. You can do your calculations in the service