作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
想在我的小部件布局中使用图像按钮。我想要一个可点击的图像,所以点击图像会改变图像。不确定如何在 WidgetProvider RemoteView 中进行设置。有谁知道如何做到这一点?具体如何从 Widget 提供程序的 onReceive 中更改图像?谢谢
谢谢
最佳答案
Specifically how to change the image from within onReceive in the Widget provider?
调用setImageViewBitmap()
, setImageViewResource()
, 或 setImageViewResource()
在 RemoteViews
上在你的onUpdate()
方法,或在 IntentService
您从 onUpdate()
调用方法,或您正在使用的任何其他地方 AppWidgetManager
更新应用小部件。
关于Android 小部件 RemoteView ImageButton setImageSource,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4950839/
想在我的小部件布局中使用图像按钮。我想要一个可点击的图像,所以点击图像会改变图像。不确定如何在 WidgetProvider RemoteView 中进行设置。有谁知道如何做到这一点?具体如何从 Wi
我是一名优秀的程序员,十分优秀!