I design an android app widget in which two ImageView
i want change the image both of the the ImageView
when click on the image as well as call a method.
Now i use RemoteView
like this
RemoteViews views1 = new RemoteViews(context.getPackageName(),
R.layout.activity_main);
views1.setOnClickPendingIntent(R.id.smsImageView, pendIntent1);
appWidgetManager.updateAppWidget(appWidgetIds, views1);
but i have no idea how i change the image in imageView
Thanks.
Widget_Layout :
In your AppWidgetProvider :
And also in your widget receiver add this two actions :
just call function to set images resources for it.
then you got it