views:

44

answers:

0

Hi, i have a widget and i personalized my buttons with a personal layout using a resource layout.

At a certain moment i want to change this type of button (that now is green), with another style (that is red), so a tried in my onReceive method this code:

remoteViews.setInt(R.id.ButtonAddOne,"setBackgroundResource",R.drawable.buttonlayoutred);

and than i push the update to the home screen. But when i try this, the button don't change aspect and it seems that the button listener be cancelled (the button don't works anymore).

What can I do?

Tnks Valerio