Search code examples
androidandroid-appwidget

How to Reset the ColorFilter of a RemoteView in an AppWidget


I am setting a ColorFilter on one of my ImageViews with the following code: -

views.setInt(myView, "setColorFilter", myColour);

Is there any way to remove this filter to return the colours to normal? I have tried using: -

views.setInt(iconResource, "setColorFilter", -1);

Any ideas what I could do to reset this? Thanks!


Solution

  • Setting the ColorFilter to 0 will clear the filter.

     views.setInt(iconResource, "setColorFilter", 0);