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.
精彩评论