I'm trying to implement a simple colorfilter on an imageview to turn the black image into a white image. In order to achieve that I do the following:
weatherImg.setColorFilter(Color.BLACK, PorterDuff.Mode.MULTIPLY); weatherImg.setImageResource(R.drawable.b_clouded_rain);
I've also tried to change to color in the color filter to red and white but all of them have no effect, what am I doing wrong?
As much as I hate to answer my own questions I found the problem: I should've used:
weatherImg.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With