开发者

Android Widget RemoteView ImageButton setImageSource

Would like to use an Image button in my widget l开发者_C百科ayout. I want an image that is clickable, so clicking on image will change the image. Not sure how to set this up in WidgetProvider RemoteView. Does anyone know how to do this? Specifically how to change the image from within onReceive in the Widget provider? Thanks

Thanks


Specifically how to change the image from within onReceive in the Widget provider?

Call setImageViewBitmap(), setImageViewResource(), or setImageViewResource() on the RemoteViews in your onUpdate() method, or in the IntentService you invoke from the onUpdate() method, or anywhere else you are using AppWidgetManager to update the app widget.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜